March 3, 2010 at 7:44 am
I've looked over the boards and not yet found an answer, is there a query that will tell me what traceflags are currently turned on in a server?
For example, I turned 1222 on earlier in the week and if I didn't know it was still on, I'd like to check and see if it is, in case someone else initiated it, or the SQL server was restarted.
March 3, 2010 at 8:20 am
DBCC TRACESTATUS(-1)
will show the current connection's status for all trace flags (global or session).
You may need to enable traceflags if you have no trace flags for the connection:
DBCC TRACEON
http://sqlserverpedia.com/wiki/Trace_Flags
http://msdn.microsoft.com/en-us/library/ms188396.aspx
_________________________________
seth delconte
http://sqlkeys.com
March 3, 2010 at 7:43 pm
The documentation for DBCC TRACESTATUS is not particularly well-phrased.
The fact is that a simple:
DBCC TRACESTATUS;
...will show all trace flags enabled for the current session, regardless of whether the trace flag is local to the current session or in effect because another connection enabled it globally.
There is never any need to issue DBCC TRACEON in order to see trace flag information.
Paul
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply