How do I find running Traces in SQL Server?
Asked Answered
B

2

33

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?

Bemba answered 12/3, 2009 at 1:4 Comment(0)
I
50

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

Irairacund answered 12/3, 2009 at 1:8 Comment(0)
M
2

Old question, but a precisation. On a SQL 2000 server you must use msdb database. Es:

USE msdb
SELECT * FROM :: fn_trace_getinfo(default) 
Myxomatosis answered 4/11, 2014 at 15:5 Comment(2)
This should be just a comment in the accepted answer, and not an aswer on itself. And "presisation" is not a word ;)Karolinekaroly
Sorry @RicardoC, I was just a beginner on stackoverflow :-)Myxomatosis

© 2022 - 2024 — McMap. All rights reserved.