How to catch what caused deadlock?

  • We have deadlock intermittently. How do I catch what caused the deadlock?

    Many thanks in advance.

  • Switch traceflag 1222 on. That will result in a deadlock graph been written to the error log every time a deadlock occurs.

    DBCC TRACEON(1222,-1)

    Or, since you're on SQL 2008, check the extended events system health session

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply