Tuesday, February 21, 2006

SQL Server 2005 - Default Trace

SQL Server 2005 out of the box comes with a default trace that's always running which tracks configurational changes and process level information. You may obtain this information from SQL Server Management Studio by higlighting the registered server and selecting "Reports" from the summary page:

You will find:
Configuration change history
Schema Changes History
Memory Consumption
All Blocking Transactions
Top Sessions
Top Connections
Top Transactions by Age
Top Queries by Average CPU time
Top Queries by Average IO & lot of other information

You may also query the default trace file using the below query:
SELECT * FROM fn_trace_gettable ('C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\log.trc', default)

GO

No comments: