Turns on (enables) the specified trace flag.
DBCC TRACEON (trace# [,...n])
Trace flags are used to customize certain characteristics controlling how Microsoft® SQL Server™ operates. Trace flags remain enabled in the server until disabled by executing a DBCC TRACEOFF statement. New connections into the server do not see any trace flags until a DBCC TRACEON statement is issued. Then, the connection will see all trace flags currently enabled in the server, even those that have been enabled by another connection.
DBCC TRACEON returns this result set (message):
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
DBCC TRACEON permissions default to members of the sysadmin fixed server role only, and are not transferable.
This example enables the display of line numbers in syntax errors.
DBCC TRACEON (106)
GO
Trace Flags | DBCC |