Script to Enable and Disable the Default Trace in SQL Server

In this post, I will give script to enable and disable default trace in SQL Server.

SQL Server 2005 introduces this default trace. This is very light weight and important for DBA activities.

Using default trace we can capture a different event of SQL Server like, errors, objects changes etc.

You can also run this trace file using SQL Server Profiler.

The Default location of this trace file is C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\.

This default trace is enabled by default, but as per use you can perform disable or enable.

Below is script to disable default trace :

Below is script to enable default trace : 
Anvesh Patel

Leave a Reply

Be the First to Comment!

Notify of