Products

Solutions

Resources

Partners

Community

Blog

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Using DBCC trace flags to find deadlocks

Return to previous page

  • 4/7/2015
  • 3250 Views

Comments

3250 Views

Using DBCC trace flags to find deadlocks

Last updated 9 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.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out