Check part one of Navigating thru deadlock • Navigating thru deadlock - Part 1
This video show how to simulate the following deadlock using,
Key Lock (Mode X-X)
Row ID Lock (Mode X-S)
Page Lock (Mode X-U)
And in each scenario I have used different mode types to show mode type deadlocks that
could occur during a real time transaction, and this could be interchanged a Mode X-S or Mod X-U lock could
also happen with Key lock and the same applies to other resources as well.
The following Youtube video shows how the data is structured and stored in the SQL server, and it might
helpful understand the different levels of resources on which they locks can be applied on.
• SQL Server behind the scene #ytvideo ...
The deadlocks has been replicated using only one table in this video, however the same can be applied to
N number of tables.
00:03 - • Navigating thru deadlock - Part 1
01:20 - • SQL Server behind the scene #ytvideo ...
03:25 - • Navigating thru deadlock - Part 1
Chapters
00:17 Key lock
01:00 Finding row location
01:31 Sessions
02:04 Monitoring Deadlock
02:33 Getting started with simulating deadlocks
02:57 Mode X-X Deadlock
03:05 Show locks
04:36 Deadlock victim
05:16 Analyzing Deadlock
06:32 Deadlock outcome
07:25 Row ID Lock
08:03 Mode X-S Deadlock
09:14 Page Lock
09:56 Mode X-U Deadlock
Medium links
Understanding the SQL Server storage data structure
/ how-a-tug-of-war-on-a-database-deadlock-le...
A quick cheat sheet of system queries
/ a-quick-cheat-sheet-of-system-queries
Navigating thru deadlock
/ navigating-thru-sql-deadlock
Connect with me in LinkedIn at / suriya-prakhash-deenadayalan
Visit https://www.suriyaprakhash.com for more info.
Music Credit
https://pixabay.com/music/beats-energ...