To set and clear trace flags with DBCC, use the TRACEON and TRACEOFF options, as described in the following procedures.
 To set trace flags on with DBCC
    To set trace flags on with DBCCThe syntax for DBCC TRACEON is as follows:
DBCC TRACEON (trace#)
For example, to turn on trace flag 3604:
dbcc traceon (3604)
 To set trace flags off with DBCC
    To set trace flags off with DBCCThe syntax for DBCC TRACEOFF is as follows:
DBCC TRACEOFF (trace#)
For example, to turn off trace flag 3604:
dbcc traceoff (3604)