DBCC stands for Database Consistency Checker. DBCC consists of a series of commands that perform a variety of functions on databases and database objects. DBCC commands are used to perform database and database object maintenance but also can be used to find errors—and in some cases, fix them. SQL Server also provides a series of trace flags that can be used to provide additional information about SQL Server such as the estimated and actual cost of a sort (trace flag 326). To turn a trace flag on for a single user connection, use the following syntax:
For example, the following syntax would turn on trace flag 326:
To turn off a trace flag, use the ...