Choosing a diagnostic tracing level

Diagnostic tracing settings are grouped into several levels, but you can also customize the settings further within these levels. The types of information gathered at the various levels are referred to as diagnostic tracing types. Following are descriptions of the levels you can specify, and the diagnostic tracing types they include. For a description of the diagnostic tracing types mentioned below, see Diagnostic tracing types.

Customizing diagnostic tracing settings allows you to reduce the amount of unwanted tracing data in the diagnostic tracing session. For example, suppose that user AliceB has been complaining that her application has been running slowly, yet the rest of the users are not experiencing the same problem. You now want to know exactly what is going on with AliceB's queries. This means you should gather the list of all queries and other statements that AliceB runs as part of her application, as well as any query plans for long running queries. To do this, you could just set the diagnostic tracing level to 3 and generate tracing data for a day or two. However, since this level can significantly impact performance for other users, you should limit the tracing to just AliceB's activities. To do this, you set the diagnostic tracing level to 3, and then customize the scope of the diagnostic tracing to be USER, and specify AliceB as the user name. Allow the diagnostic tracing session to run for a couple of hours, and then examine the results.

The recommended method for customize diagnostic tracing settings is using the Database Tracing Wizard. See Changing diagnostic tracing configuration settings.

You can also use the sa_set_tracing_level system procedure; however, you cannot make as many customizations using this approach. See also sa_set_tracing_level system procedure.

As a good practice, you should not change diagnostic tracing settings while a tracing session is in progress because it makes interpreting the data more difficult. However, it is possible to do so. See Changing diagnostic tracing settings while a tracing session is in progress.


Diagnostic tracing levels
Diagnostic tracing scopes
Diagnostic tracing types
Diagnostic tracing conditions