O'Reilly logo

Pro SQL Server Internals, Second Edition by Dmitri Korotkevitch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Dmitri Korotkevitch 2016

Dmitri Korotkevitch, Pro SQL Server Internals, 10.1007/978-1-4842-1964-5_19

19. Deadlocks

Dmitri Korotkevitch

(1)Tampa, Florida, USA

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required