Products

Solutions

Resources

Partners

Community

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
  • 4345 Views

Comments

4345 Views

Using DBCC trace flags to find deadlocks

Last updated long time 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