A deadlock is a special blocking case that occurs 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, allowing the others to continue.
This chapter will demonstrate why deadlocks occur in the system and explain 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 ...