SQLBits 2024

Analysing and Resolving Deadlocks.

Learn how get information about the deadlock XML, how to read it, what actions you can take to prevent deadlocks or at least mitigate the consequences of them. The session also includes a recap on locking in SQL Server.
About every developer and DBA has to deal with deadlocks in their work. This session starts with a brief introduction to define what a deadlock is. The next step is to learn how you get information about deadlocks, how to get hold of the deadlock XML. From here I proceed to explain how to read that XML, and particularly what are the important things you should look for.

Before moving on how to resolve deadlocks, there is an interlude with a recap on the most important locking concepts in SQL Server, since without understanding about the locking mechanisms in SQL Server, it will be difficult to analyse and resolve deadlocks.

The second half of the session discusses various ways on how you can prevent deadlocks. Sometimes it is not entirely possible or feasible to entirely prevent deadlocks, and the session discusses which mitigating actions you can take in these cases.