A deadlock is a special blocking case when multiple sessions , or sometimes multiple execution threads within a single session, block each other. When it happens, SQL Server terminates one of the sessions, thus allowing others to continue.
This chapter demonstrates why deadlocks occur in the system and explains how to troubleshoot and resolve them.
Classic Deadlock
A classic deadlock occurs when two or more sessions are competing for the same set of resources. Let’s look at a by-the-book example and assume that you have two sessions updating two rows in the table in the opposite order.
As the ...