Tag Archives: DBCC TRACEOFF

DBCC TRACEON / DBCC TRACEOFF/ DBCC TRACESTATUS

DBCC TRACEON / DBCC TRACEOFF/ DBCC TRACESTATUS

DBCC TRACEON – Enable trace flags.
DBCC TRACEOFF – Disable trace flags.
DBCC TRACESTATUS – Display the status of trace flags.

–>  Turn flag on for only the session level 

DBCC TRACEON (1222)

DBCC TRACEON (1205,1222)
GO

–> Turn flag on globally at server for all the sessions

DBCC TRACEON (1222, -1)
GO

— >Turn flag off

DBCC TRACEOFF (1222);
GO

–> Show flag status

DBCC TRACESTATUS (1205,1222)

DBCC TRACESTATUS (-1)