SQL Bacon Nugget of Excellence Award @MladenPrajdic

Prior Winners:

This “award” has (unintentionally) not been handed out in a while but something that I’ve used (or a variation of) for a while now that I think needs to get bumped back up to the top of everyone’s RSS Feed is Mladen Prajdic’s I.D.N.W.C.E.C (a not so catchy acronym that I just came up with).

Immediate Deadlock Notifications Without Changing Existing Code

Mladen describes how to use the server wide deadlock notification (Event Notifications) to capture the deadlock graph (or deadlock chain, deadlock, escalation) to a table as soon as a deadlock occurs (as well as optionally to send an email at time of capture).

Now what I like about this over the more “traditional” way of detecting deadlocks with Trace Flags 1204 and 1222 (MSDN Link) is that we’re able to capture the deadlock graph event like we were running a Profiler trace against the server.  Using trace flags 1204 and 1222 you get all the same information but I’m a picture person….

and as a picture person I much prefer to see the deadlock graph over the “texty” / XMLish type of information you get back from Trace Flags 1204 and 1222.

Big thanks and props to Mladen for this blog post as I’ve come back to it time and time again :)

If you’d like to chat with me about this or anything else (SQL or other) please leave a comment or hit me up on my Twitter: @ColinStasiuk

Post to Twitter Post to Delicious Post to Digg Post to StumbleUpon