This is the first part of a series of posts about the data collector in SQL Server 2008. The data collector captures key Windows Performance Monitor counters and internal SQL Server counters every minute in a SQL Server database. In this post, I'll show you how to use the data collector to examine the affect that modifying settings and the environment has on SQL Server performance. The focus of this post is on using this tool to determine the impact of the modifications and not on tuning SQL Server.
The data collector captures approximately 1,000 measurements or more every minute. The measurements are Performance Monitor counters and operating system wait statistics. The second part of this series will list the measurements. The tool's default behavior is to purge data after one week. This behavior is not always ideal, and I will revisit this issue in part 3.
First, I'll demonstrate the "replay with variation" option.
Method: I capture a snapshot of a database and a database load (for example, I capture from SQL Server Profiler). Assume that I am using a virtual machine to:
Then, I shut down the computer and repeat these steps after I make some change. My goal is to determine which items the change affected.
Because many of you have never used the data collector, I'll walk through the steps of how to set it up:
For the next day's data, follow these steps:
Note: You must click the ellipsis button (…) next to the Server name box to enable the Database name box.
Remember that collecting data is automatically enabled when you finish the wizard.
The following chart shows some data that the data collector collected for three different environments. The environments were:
This chart sourced data directly from the data collector database tables. If you have ever tried to make comparison charts from Performance Monitor data, you realize that this is a better approach.
In part 2 of this series, I will list what measurements are captured. In part 3, I will discuss viewing the information and extracting the data for custom charting.
Ken Lassesen is part of the original team that created Dr. GUI of MSDN and specializes in new and resurrected commercial product architecture. He developed architecture for several Microsoft websites, including the original MSDN site and the current Microsoft Partner Network site. He's equally at home with SQL Server, XHTML, Section 508 accessibility standards, globalization, Security Content Automation Protocol (SCAP) security, C#, and ASP.NET server controls. When he is not having fun with technology, he enjoys taking lunch-break hikes in the North Cascades.