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