Friday, January 09, 2009

Debugging Deadlocks in SQL Server Sucks Less These Days

I'm debugging deadlocks in SQL Server 2005. I hate debugging deadlocks.

The good news is that debugging deadlocks in SQL Server 2005 sucks a lot less than it did in SQL Server 2000.

Bart Duncan expresses the difference well:

Turn on trace flag 1222 with "DBCC TRACEON (1222, -1)" or by adding "-T1222" as a SQL startup parameter. This trace flag is a new trace flag in SQL 2005, a much improved version of the tried-and-true -T1204. If you’re running SQL 2005, you should be using 1222 instead of 1204 unless you have deep-seated masochistic tendencies. Alternatives to 1222:
  • If you are using SQL 2000 or SQL 7.0, you’ll have no choice but to fall back on the older -T1204.
  • There’s a "Deadlock graph" Profiler trace event that provides the same info as -T1222. Feel free to use this instead of -T1222 if you’re on SQL 2005. But don’t waste your time with the "Lock:Deadlock" and "Lock:Deadlock Chain" trace events that are in SQL 2000, as they provide an unacceptably incomplete picture of the deadlock.


That quote is taken from the first part in an excellent three-part series on debugging deadlocks in SQL Server 2005:

Also, there's Basic SQL Server Deadlock Debugging over on Tog's Blom.

I also like the Troubleshooting Deadlocking section in Inside Microsoft SQL Server 2005: Query Tuning and Optimization by Kalen Delaney.

1 comment:

  1. Later, the corporate rolled out an update across platforms that separated long-form, Shorts and Live videos into their own tabs on channel pages. Meta introduced its Q3 earnings with income down 4% YoY to $27.7 billion, internet income down 52% YoY to $4.4 billion, DAUs across its apps up 4% YoY to 2.93 billion. 더킹카지노 The inventory dropped 25% on the income decline as buyers voiced considerations about how a lot Meta is spending on its metaverse ambitions. Pinterest reported its Q3 income was up 8% YoY to $684.6 million, above estimates of $666.7 million. However, international MAUs remained flat YoY at 445 million, above estimates of 437.4 million. The Snapchat app rolled out Director Mode,a feature offering TikTok-like tools together with a green screen, quick edit and digital camera velocity options, as well as|in addition to} a BeReal-like dual digital camera mode.