Dela via


Collecting SQL Trace Data to Monitor and Improve Performance in Load Tests

SQL tracing is a tool that you can use in your load tests to help you monitor and improve the performance of your Web applications. You should use SQL tracing only if your Web application uses SQL Server to store data.

Note

SQL tracing is not restricted to Web performance tests. Unit tests for applications that access SQL Server databases are also good candidates for SQL tracing.

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. You enable tracing by editing your load test in the Load Test Editor after you create it.

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 then deleted. You analyze the trace data in the SQL Trace table after your load test has completed. For more information, see How to: View SQL Trace Data in Load Tests Using the SQL Trace Table.

If SQL tracing is enabled, SQL trace data can be displayed in the Load Test Analyzer on the SQL Trace table that is available in the Tables View. To diagnose SQL performance problems, SLQ tracing is a fairly easy-to-use alternative to starting a separate SQL Profiler session while the load test is running. To enable this feature, the user who is running the load test must have the SQL privileges that are required to perform SQL tracing, and a directory (usually a share) where the trace file will be written must be specified. At the completion of the load test, the trace file data is imported into the load test repository and associated with the load test that was run so that it can be viewed at any later time using the Load Test Analyzer.

Note

For a complete list of the run settings properties and their descriptions, see Load Test Run Setting Properties. Tasks

Tasks

Associated Topics

Use the SQL tracing tool to improve performance: SQL tracing is a tool that you can use in your load tests to help you monitor and improve the performance of your Web applications.

See Also

Concepts

Managing Load Test Results in the Load Test Results Repository

Other Resources

Creating and Editing Load Tests

Analyzing Load Test Runs