• Don't forget that in SQL 2005 +, that the default trace (which starts automatically) captures deadlock graph information. So you can set up a job that fires when this event is raised, and just query that trace file to get the deadlock graph.

    If you need help viewing the deadlock graph or figuring out what is going on, I have some code in the "Code Library" section of my blog for reading the deadlock graph and presenting the information in tabular form. It can be found here[/url]. This code shows how to get the deadlock graph from the default trace - you could use this in the routine that sends you the notification email.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2