PASS logo

Summit video library

Analysing and Resolving Deadlocks

Erland Sommarskog

No matter you are a developer or a DBA, you may have to battle deadlocks in SQL Server applications. The first step when resolving a deadlock is to get information about the deadlock, and more precisely you need to get hold of the deadlock XML and this starting point for this session. Seeing the deadlock XML for the first time, you may be overwhelmed by all the information, and in the next section of this presentation I discuss what you must pay close attention to and what you can ignore.

Before moving on how to resolve deadlocks, there is an interlude, where I make a recapitulation of locking in SQL Server, as an understanding of locking is important to analyse deadlocks.

In the second half of the session, I discuss various measures you can you can apply to prevent deadlocks. Sometimes, you may not be able to entirely eliminate your deadlock, but you may be able to take measures to mitigate them to reduce the harm of the deadlock. Not all these measures are necessarily good measures – with the wrong choice you can cause more harm than the deadlock did, and this is something I will come back to more than once.

Get the Latest

Sign up to stay up to date with news, special announcements and educational content.

Redgate will only contact you about PASS Data Community Summit (in line with our Privacy Policy) unless you separately request emails about Redgate. You can unsubscribe from these updates at any time.