Predicting Change Outcomes Leveraging SQL Server Profiler



Similar documents
MOC 20462C: Administering Microsoft SQL Server Databases

MCTS Microsoft SQL Server 2005 Implementation & Maintenance

6231B: Maintaining a Microsoft SQL Server 2008 R2 Database

Maintaining a Microsoft SQL Server 2008 Database

This presentation is an introduction to the SQL Server Profiler tool.

$99.95 per user. SQL Server 2008/R2 Database Administration CourseId: 157 Skill level: Run Time: 47+ hours (272 videos)

Explain how to prepare the hardware and other resources necessary to install SQL Server. Install SQL Server. Manage and configure SQL Server.

Introduction. Part I: Finding Bottlenecks when Something s Wrong. Chapter 1: Performance Tuning 3

Course Syllabus. At Course Completion

MOC Administering Microsoft SQL Server 2014 Databases

Microsoft SQL Server OLTP Best Practice

6231A - Maintaining a Microsoft SQL Server 2008 Database

Administering Microsoft SQL Server Databases

Oracle Database Performance Management Best Practices Workshop. AIOUG Product Management Team Database Manageability

50238: Introduction to SQL Server 2008 Administration

NUTECH COMPUTER TRAINING INSTITUTE 1682 E. GUDE DRIVE #102, ROCKVILLE, MD WEB: TEL:

Oracle Database 12c: Performance Management and Tuning NEW

Load Testing Analysis Services Gerhard Brückl

SQL Server Training Course Content

Mind Q Systems Private Limited

SQL SERVER FREE TOOLS

SQL Server 2012 Database Administration With AlwaysOn & Clustering Techniques

About Me: Brent Ozar. Perfmon and Profiler 101

Course 20462C: Administering Microsoft SQL Server Databases

Course. Overview. Length: 5 Day(s) Published: English. IT Professionals. Level: Type: Method: Delivery. Enroll now (CAL)

Administering Microsoft SQL Server Databases

Basic knowledge of the Microsoft Windows operating system and its core functionality Working knowledge of Transact-SQL and relational databases

Upgrading Your SQL Server 2000 Database Administration (DBA) Skills to SQL Server 2008 DBA Skills Course 6317A: Three days; Instructor-Led

Microsoft SQL Server for Oracle DBAs Course 40045; 4 Days, Instructor-led

Course Outline: Course 6317: Upgrading Your SQL Server 2000 Database Administration (DBA) Skills to SQL Server 2008 DBA Skills

Migrate, Manage, Monitor SQL Server 2005: How Idera s Tools for SQL Server Can Help

Administering a SQL Database Infrastructure

Administering a SQL Database Infrastructure 20764; 5 Days; Instructor-led

LEARNING SOLUTIONS website milner.com/learning phone

Getting to Know the SQL Server Management Studio

Microsoft SQL Server 2008 Step by Step

SQL Server 2014

MIRRORING: START TO FINISH. Ryan Adams Blog - Twitter

Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server Databases

SQL Server 2008 Designing, Optimizing, and Maintaining a Database Session 1

Database Administrator Certificate Capstone Project Evaluation Checklist

Database Maintenance Essentials

SQL Server Developer Training Program. Topics Covered

Frontstream CRM Pro to Pro Upgrade Guide (Note: This guide is ONLY applicable for upgrading from Pro to Pro)

MS SQL Server DBA Training Course. Table of Contents

Oracle Database 11g: Administration Workshop II DBA Release 2

Microsoft SQL Database Administrator Certification

Upon completion of the program, students are given a full support to take and pass Microsoft certification examinations.

Microsoft SQL Server Beginner course content (3-day)

Resource Monitoring During Performance Testing. Experience Report by Johann du Plessis. Introduction. Planning for Monitoring

Administering Microsoft SQL Server Databases

Best Practices for Upgrading to SQL Server 2012

ITPS AG. Aplication overview. DIGITAL RESEARCH & DEVELOPMENT SQL Informational Management System. SQL Informational Management System 1

MS Administering Microsoft SQL Server Databases

Administering a Microsoft SQL Server 2000 Database

MSSQL quick start guide

SQL Server 2008 Administration

Redundancy Options. Presented By: Chris Williams

Performance Monitoring AlwaysOn Availability Groups. Anthony E. Nocentino

Automating Administration with SQL Agent

$99.95 per user. SQL Server 2005 Database Administration CourseId: 152 Skill level: Run Time: 30+ hours (158 videos)

Database Services for CERN

Automate Your BI Administration to Save Millions with Command Manager and System Manager

Implementing a Microsoft SQL Server 2005 Database

SQL Server Setup for Assistant/Pro applications Compliance Information Systems

SQL Server 2005 Implementation and Maintenance. 50 Cragwood Rd, Suite 350 South Plainfield, NJ 07080

IBM Tivoli Monitoring V6.2.3, how to debug issues with Windows performance objects issues - overview and tools.

SQL Server 2012 Gives You More Advanced Features (Out-Of-The-Box)

Monitoring HP OO 10. Overview. Available Tools. HP OO Community Guides

MOC 10964C: Cloud and Datacenter Monitoring with System Center Operations Manager

Product Review: James F. Koopmann Pine Horse, Inc. Quest Software s Foglight Performance Analysis for Oracle

Administering Microsoft SQL Server Databases MOC 20462

UBGP008: Maximizing SQL Server Performance with Microsoft Dynamics GP. John Lowther

Microsoft SQL Server Guide. Best Practices and Backup Procedures

Squeezing The Most Performance from your VMware-based SQL Server

Course Outline:

ICE for Eclipse. Release 9.0.1

Administering a Microsoft SQL Server 2000 Database

Manage Your Shop with Policy Based Management & Central Management Server

Oracle Database 11g: Administration Workshop II DBA Release 2

20462C: Administering Microsoft SQL Server Databases

Working with SQL Server Agent Jobs

form approved June/2006 revised Nov Page 1 of 7

General DBA Best Practices

This article Includes:

SQL Server for Database Administrators Course Syllabus

Video Administration Backup and Restore Procedures

1. This lesson introduces the Performance Tuning course objectives and agenda

Workshop & Chalk n Talk Catalogue Services Premier Workshop & Chalk n Talk Catalogue

Beginning SQL Server Administration. Apress. Rob Walters Grant Fritchey

Oracle vs. SQL Server. Simon Pane & Steve Recsky First4 Database Partners Inc. September 20, 2012

Configuring Backup Settings Configuring and Managing Persistent Settings for RMAN Configuring Autobackup of Control File Backup optimization

ORACLE DATABASE 11G: COMPLETE

Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server Databases

DBA 101: Best Practices All DBAs Should Follow

MS SQL Server 2014 New Features and Database Administration

ADMINISTERING MICROSOFT SQL SERVER DATABASES

Designing Database Solutions for Microsoft SQL Server 2012

Transcription:

Welcome Predicting Change Outcomes Leveraging SQL Server Profiler Lee Everest SQL Rx

Today s Agenda Observations Tools for performance tuning SQL Server SQL Server Profiler SQL Trace Replay SQL Trace Replay methodology Demo Conclusion

Observations from the field We re always in a reactive mode If it works pretty well, then push it! Leave performance tuning out of development phase, for a number of reasons Requirements definitions are incomplete Production/development environments are becoming vastly different Substantive testing a thing of the past

Change, and the challenges that we face 24-month Microsoft release schedules Service Packs Hot Fixes Maintenance (Corrective, Adaptive, Perfective) Upgrades in hardware Shrinking development windows Shrinking service windows Increasingly demanding customers

Tools for performance tuning SQL Server Dynamic Management Views and Functions, custom scripts Flexible Much more information now available Performance Monitor Still the top tool for looking at server performance Real time or extended logging

Tools for performance tuning SQL Server Database Tuning Advisor New tool for performance tuning Initial offering good, will (needs to) get better SQL Server Profiler Rollover traces, Correlated perfmon counters Analysis Services and Integration Services Microsoft.SqlServer.Management.Trace and Trace Replay APIs

These tools are great but we tend to use them after the fact

We need a way to predict what our changes will look like before we put them into production. SQL Server Profiler An interesting way to leverage an existing tool

SQL Server Profiler Microsoft SQL Server Profiler is a graphical user interface to SQL Trace for monitoring an instance of the SQL Server Database Engine or Analysis Services. Books Online

Types of traces Ad-hoc traces Server-side traces Pre-defined template traces

SQL Trace Templates Ship with SQL Server Great starting point for all traces Create custom templates

Specifically, SQL Trace Replay Trace Replay - Allows you to save a trace and then replay it for a much deeper analysis of results.

Why use SQL Trace Replay? A method to predict behaviors before rolling them into production To compare the same set of work between one database server and another Make changes to the database, and then analyze the outcome of those changes Easier to use than most load-testing tools, and it comes free with SQL Server. Useful for reads, writes, and CPU

Topic has been touched upon, but Hotek, M. (2007). Lesson 1: Working with SQL Server Profiler. In Solid Quality Learning, Microsoft SQL Server 2005 Implementation and Maintenance (pp. 543-545). Redmond, WA: Microsoft Press. Tells us that SQL trace exists and is used for problem solving, but doesn t explain it or show how to use. Delaney, K. (2008). Tracing and profiling. In Delaney, K, Inside Microsoft SQL Server 2005 Query Tuning and Optimization (pp. 64-69). Redmond, WA: Microsoft Press Explains, but leaves out methodology and steps. Ben-Gan, I. (2000). Problem Solving with SQL Profiler. Retrieved 3/16/08 from http://www.sqlmag.com/articles/articleid/8232/pg/1/1.html About as close as I ve seen, but not quite.

SQL Trace Templates

SQL Trace Replay - Events

Requirements for Trace Replay Identify trace expectations Access to two SQL Server instances Database backup Trace from Production (Workload) Production Logins Test box with changes to implement (service pack, hot fix, patch, DDL, others )

Trace Replay Methodology Evaluation Environment 1. Production Environment 2. Test1 3. Test2 (proposed) 1b Capture Replay Trace Workload Restore of production as exists Test Changes (sp, o/s, etc) Restore DB 3a 1a 2a Restore DB Changes (DDL) Backup Production 2b Replay Workload & capture metrics Replay Workload & capture metrics 3b Compare OK? No Compare- OK? 3c Yes! Done

Demo 1

Sample client results

Demo 2

Comparison with Database-Level Settings SELECT SUM(reads), SUM(writes), SUM(cpu) FROM fn_trace_gettable ('C:\SQLRx\Replay\BaseLineTrace.trc', DEFAULT) GO

When to use Trace Replay? Moving to a new version of SQL Server Before applying a new service pack to production Upgrading to new hardware Moving to a new operating system Bulk changes, or increases in amount of data Index tuning Testing changes and examining their interaction with existing code and processes Baselines

When not to use Trace Replay? The workload must be able to run with relatively few errors Many schema changes can break the workload Linked Servers make it interesting Multiple databases are tough Whenever something is in a trace file which cannot be duplicated in another environment When a large process cannot be separated into a logical subcomponent.

Conducting a Trace Replay - Notes Must start trace immediately after backup Database id s must be the same Logins must be transferred to dev/test server Expect a high utilization rate dedicate a time slot for trace replay on test server Duration counter will produce inconsistent values recommend not using Possibility of multiple iterations Experiment with threads and specific spids

Conclusion We have challenges, and they must be managed SQL Profiler a powerful tool for predictive tuning Specifically, SQL Server Trace Replay Steps necessary for successful Trace Replay Methodology Demos Why/when to use SQL Trace Replay? Conducting a replay - Notes

Additional Resources Contacts: Lee Everest leverest@isi85.com tsql-northlake@dcccd.edu Blog: www.texastoo.com Lori Brown lorib@isi85.com Delaney - Inside Microsoft Query Tuning SQL Server Magazine

Q & A