Learning SQL server part.1 — lock and concurrency in SQL server
Published in
7 min readApr 6, 2019
Even though I used the SQL server for a long time, I didn’t know it very well. However, I received an alert with the message ‘Transaction (Process ID) was deadlocked on lock resources with another process and has been chosen as the deadlock victim’ from PagerDuty on one day.
So I tried to figure out what happened on the SQL server and study the knowledge.
The story starts from here
- The message is ‘Transaction (Process ID) was deadlocked on lock resources with another process and has been chosen as the deadlock victim’.
- Then I traced the log from Management->Extend Events->Sessions-> system health.
- There is a deadlock diagram. What happened? What is “deadlock”? How did it cause?
To answer these questions, we have to acquire some basic knowledge. So here are the concepts I wrote on this topic.
- Isolation levels