Export (0) Print
Expand All

How to: Integrate SQL Trace Data Using the Load Test Editor

This topic applies to:

Visual Studio Ultimate

Visual Studio Premium

Visual Studio Professional 

Visual Studio Express

Topic appliesTopic does not applyTopic does not applyTopic does not apply

SQL tracing is a tool 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.

NoteNote

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 to analyze later. You can enable SQL tracing only in the Load Test Editor. You cannot enable SQL tracing when you create the load test with the New Load Test Wizard. For more information, see Collecting SQL Trace Data to Monitor and Improve Performance in Load Tests.

NoteNote

To use SQL tracing in a load test that is run locally on a computer that is running Windows Vista, you must be a member of the sysadmin role on the SQL Server instance that is being traced. To fix this problem, a SQL Server administrator must add you to the sysadmin role.

To enable SQL tracing for a load test run

  1. Open a load test in the Load Test Editor.

  2. Right-click the active Run Settings node for your load test and then click Properties.

    The Properties window is displayed.

  3. Set the SQL Tracing Enabled property. True indicates that SQL Tracing is enabled; False indicates that it is not.

  4. Set the SQL Tracing Connect String property. Type the connection string of the SQL server you want to monitor, or click the ellipsis button to open the Connection Properties dialog box.

  5. Set the SQL Tracing Directory property. Type a folder in which to store the SQL trace data. The path must be accessible to the SQL Server and the client that is running Visual Studio Ultimate.

  6. Set the Minimum Duration of Traced SQL Operation property. Type a value for the minimum duration of traced queries. For example, 500 indicates that all queries that take longer than 500 are traced. The units are in milliseconds. For SQL Server 2005, the units are in microseconds.

  7. Save and run your test.

    You can view the SQL Tracing data only after your load test has completed. For more information, see How to: View SQL Trace Data in Load Tests Using the SQL Trace Table.

    NoteNote

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

Community Additions

ADD
Show:
© 2014 Microsoft