Trace flags in SQL Server are used to modify behavior of SQL server, turn on/off some features. DBCC commands can control trace flags:
The following example switches on trace flag 3205 globally and 3206 for the current session:
DBCC TRACEON (3205, -1);
DBCC TRACEON (3206);
The following example switches off trace flag 3205 globally and 3206 for the current session:
DBCC TRACEON (3205, -1);
DBCC TRACEON (3206);
The following example displays the status of trace flags 2528 and 3205:
DBCC TRACESTATUS (2528, 3205);