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?
Asked
Active
Viewed 6.0k times
33

Mitch Wheat
- 295,962
- 43
- 465
- 541

GordyII
- 7,067
- 16
- 51
- 69
2 Answers
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

Mitch Wheat
- 295,962
- 43
- 465
- 541
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)

user_0
- 3,173
- 20
- 33
-
1This should be just a comment in the accepted answer, and not an aswer on itself. And "presisation" is not a word ;) – Ricardo C Jun 22 '15 at 16:55
-
Sorry @RicardoC, I was just a beginner on stackoverflow :-) – user_0 Jun 22 '15 at 17:10