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 : 

Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from

Leave a Reply

Be the First to Comment!

Notify of