SQL Server: Collecting and Analyzing Trace Data Module 1: Introduction

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

SQL Server: Collecting and Analyzing

Trace Data
Module 1: Introduction
Jonathan M. Kehayias
Jonathan@SQLskills.com

Introduction
This course applies to all versions from SQL Server 2005 onwards
Understanding how an application is actually using SQL Server is
critical when tuning query performance
Sometimes query execution plans are not cached, which makes
workload analysis impossible without tracing
Reasons for a query execution plan not being cached include:

Auto-parameterization
The use of RECOMPILE query hints
The execution plan has zero cost to compile

Collecting Trace Information


Workload information collected from SQL Server using SQL Trace can
be used for many purposes:

Troubleshooting performance
Auditing activity
Collecting sample data for testing and performance analysis
Debugging Transact-SQL statements and stored procedures

Performance is usually critical and incorrect workload collection can


impact server throughput

Workload Analysis
Collecting workload information is only half the battle; analysis to find
key events and trends is the other half
Common questions that need to be answered include:

Which queries execute the most frequently?


Which queries have the highest accumulated duration?
Which queries have the highest accumulated reads?
Why are errors or exceptions occurring?

Third-party tools and free tools from Microsoft can help make
answering these questions very simple

Course Structure

Module 2: SQL Trace Architecture


Module 3: Using SQL Server Profiler
Module 4: Performance Considerations and Server Side Trace
Module 5: Tracing Scenarios
Module 6: Analyzing Trace Data
Module 7: Performing Replay Operations

You might also like