RSS

Check Trace File information

08 May

by this Script you will Check the trace file information :

SELECT *

FROM fn_trace_getinfo(default);
GO

Result Set Description
Traceid Unique identifier for the trace
Property = 1 Configured trace options
Property = 2 Trace file name
Property = 3 Max file size for the *.trc file
Property = 4 Stop time for the trace session
Property = 5 Current trace status (1 = On and 0 = Off)
Value Current value for the traceid\property combination
*/

 

–Return that information for all traces running on the system
SELECT traceid, value FROM [fn_trace_getinfo](NULL)
WHERE [property] = 2;
SELECT *
FROM [fn_trace_gettable](‘C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\log_33.trc’, DEFAULT)
ORDER BY StartTime;

 
Leave a comment

Posted by on May 8, 2013 in Performance MSSQL

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s