Using DBCC trace flags to find deadlocks

Return to previous page

  • 4/7/2015
  • 1771 Views

Comments

1771 Views

Using DBCC trace flags to find deadlocks

Last updated 6 years ago

Comments

Common

(Enter the content of this article below)

Advanced

 
Trace flags are used to temporarily set specific server characteristics or to switch off a particular behavior. There are two different trace flags pertaining to deadlocks, 1204 and 1222. The later is only available in SQL 2005/2008 and above and should be used if you are running under these sql server versions.

To turn on deadlock tracing:

-- SQL 2000 version

DBCC TRACEON (1204, -1)

-- SQL 2005 version
DBCC TRACEON (1222, -1)


Turn off deadlock tracing:

-- SQL 2000 version

DBCC TRACEOFF (1204, -1)

-- SQL 2005 version
DBCC TRACEOFF (1222, -1)


This will globally turn deadlock tracing.
Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out