NetInverse Developers Blog

March 7, 2009
Category: SQL — Tags: — admin @ 11:29 pm

SQL Server 2005 has a default trace running. Default trace provides troubleshooting assistance to database administrators by ensuring that they have the log data necessary to diagnose problems the first time they occur. You can execute the following command to view it:

SELECT * FROM fn_trace_gettable(
   'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\log.trc', default);
GO

The trace is stored in the LOG directory for your SQL Server instance (i.e. C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\) at the root of where your SQL Server is installed. To determine if the trace is configured to run, execute sp_configure and review the ‘default trace enabled’ option. When the config_value and run_value are equal to 1, then this trace is running. You can use sp_configure command to turn it off too.

You can search “Default Trace enabled Option” in the SQL Help to find more detailed information about the default trace.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

©2009 NetInverse. All rights reserved. Powered by WordPress