Displays the status of trace flags.
DBCC TRACESTATUS (trace# [,...n])
DBCC TRACESTATUS returns this result set; trace flags 106 and 107 were specified (values may vary):
TraceFlag Status
----------- -----------
106 0
107 0
(2 row(s) affected)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
DBCC TRACESTATUS returns a column for the trace flag number and a column for the status, indicating whether the trace flag is on (1) or off (0). To get status information for all trace flags currently turned on, specify - 1 for trace#.
DBCC TRACESTATUS permissions default to members of the sysadmin fixed server role only, and are not transferable.
This example displays the status of all currently enabled trace flags by specifying a value of -1.
DBCC TRACESTATUS(-1)
GO
This example displays the status of trace flags 204 and 107.
DBCC TRACESTATUS (204,107)
GO
Trace Flags | DBCC |