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 tracing types. Following are descriptions of the levels you can specify, and the tracing types they include. For a description of the tracing types mentioned below, see Diagnostic tracing types.
Customizing tracing settings allows you to reduce the amount of unwanted tracing data in the 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 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 tracing level to 3, and then customize the scope of the tracing to be USER, and specify AliceB as the user name. Allow the tracing session to run for a couple of hours, and then examine the results.
The recommended method for customize tracing settings is using the Database Tracing wizard. See Changing 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 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 tracing settings while a tracing session is in progress.
Diagnostic tracing levels
Diagnostic tracing scopes
Diagnostic tracing types
Diagnostic tracing conditions