Sql-server – DBCC TRACEON with the global flag

dbccsql server

In the question Need Help Troubleshooting Sql Server 2005 Deadlock Scenario there was a suggestion of using DBCC TRACEON (1204, -1) to trace deadlocks globally.

When reading about this command in BOL it states that it should only be used while users or applications are not concurrently running statements on the system. Does it mean that we must be in singleuser-mode when enabling this trace-flag? And in addition, why is it required and is it important to follow the advice? (Just seems a bit hard to follow in a production system that is always running.)

Best Answer

This applies more to other trace flags (eg 610 for minimal logging) that affect the optimiser and important behaviours/optimisations

You should be OK with the deadlock trace flags 1204, 1205 and 1222