Search code examples
sqlsql-server-2005sql-server-2008sql-server-profilersqltransaction

How to use SQL Profiler Trace File with Dead Lock Events?


I am quite new to using sql profiler. I have a scenario in my application which runs on sql back end where i keep getting dead locks at the same place. I am able to reproduce it very easily. Using the link SQL Profiler Steps I was able to get a sql profiler deadlock event graph. I am also able to export it into a separate file.

But in this profiler I see things like "Server Process ID", "Event ID", "Execution Context ID", "PAGE LOCK:" "DB ID", "FILE ID", "PAGE ID", "associated object ID" and many more. But I am not sure how to use this and get to know the exact cause for the dead lock. I am sure that my application has a bug that I need to clear. But How can I use this trace to get to the root cause and understand the background. Please help me with this analysis. Please let me know any kind of details or links that you feel would be of help for me. Thank you for the advice and time.


Solution

  • Check out Bart Duncan's series on troubleshooting Deadlocks - he explains how to interpret the data in the deadlock graph there.

    http://blogs.msdn.com/b/bartd/archive/tags/sql+deadlocks/