How to enable and disable trace flags, or check for active trace flags in SQL Server
Enabling and disabling trace flags on session level (you cannot enable a session-level trace flag by using a startup option):
DBCC TRACEON(trace_flag)
for example:
DBCC TRACEON(3604)
DBCC TRACEOFF(trace_flag)
for example:
DBCC TRACEOFF(3604)
Enabling trace flag on global level:
- adding the flag with –T switch to the startup parameters of the SQL Server Service (use an uppercase “T” to pass the trace flag number):
right-click on the SQL Server service using Configuration Manager, select Properties and the Advanced tab, and add for example:
;-T1204
to the Startup Parameters entry.
No comments:
Post a Comment