Avoid Deadlocks

Avoid Deadlocks

3.553 Lượt nghe
Avoid Deadlocks
I’ve been trying to figure out the cause of a SQL deadlock problem, and it dawned on me that preventing deadlocks shouldn’t be that hard. You just have to save data in the same order every time, and the easiest way to do that is to have a repository with one save method. I'll show you what a deadlock is, and how to prevent them. #sql #csharp #database Blog: https://betterwithcode.com/ LinkedIn: https://www.linkedin.com/in/jeff-zuerlein-2aa67b7/ To find deadlocks in your database... SP_BlitzLock: https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/tree/main#sp_blitz-overall-health-check 00:00 Introduction 00:40 Example Aggregate 01:08 What is a deadlock? 02:54 Fixing the repository. 03:51 Tools to find problems.