How to: View SQL Trace Data in Load Tests Using the SQL Trace Table
This topic applies to:
Visual Studio Ultimate
Visual Studio Premium
Visual Studio Professional
Visual Studio Express
You can collect SQL trace data during a load test run to analyze later. Collecting trace data lets you identify the slowest running queries and stored procedures in the SQL Server database being tested. For more information, see Collecting SQL Trace Data to Monitor and Improve Performance in Load Tests.
You enable tracing by editing your load test in the Load Test Editor after you create it. For more information, see How to: Integrate SQL Trace Data Using the Load Test Editor.
If SQL tracing is enabled, a file is created during the load test run that contains the trace data. This data is automatically saved in the Load Test Results Store at the end of the test run and the trace file is deleted. You analyze the trace data in the SQL Trace table after your load test has completed.
Viewing SQL Trace Data
To view SQL Trace Data
In the Load Test Analyzer, click Tables on the toolbar to make sure that the table grid is displayed.
In the Table drop-down list box, select SQL Trace.
The trace data that was collected during the run is displayed in the grid. The table lists the slowest running SQL operations sorted by duration, with the slowest at the top. Typically, the Duration column is the first column to examine. The data is displayed in milliseconds.
The columns displayed are as follows:
If you want to trace SQL events other than the data identified in these columns, you can set up your own custom SQL tracing using the SQL Profiler, a tool that is separate from Visual Studio Ultimate. For more information, see Introducing SQL Server Profiler.