How do I find running Traces in SQL Server?

GordyII picture GordyII · Mar 12, 2009 · Viewed 53.1k times · Source

Is there an easy way to determine what traces have been set up by sp_trace_create on SQL Server 2000? How about for SQL Server 2005, 2008, 2012, or 2014?

Answer

Mitch Wheat picture Mitch Wheat · Mar 12, 2009

SQL Server 2005 (onwards):

    SELECT * FROM sys.traces

SQL Server 2000 :

    USE msdb
    SELECT * FROM fn_trace_getinfo(default);

Ref: fn_trace_getinfo

Column descriptions for sys.traces DMV can be found here: sys.traces