Demo Preparation 1 2Create Database [Deadlockdemo] 3go 4use [Deadlockdemo]; 5go 6CREATE TABLE dbo.invoices_demo ( 7 id int NOT NULL, 8 num nvarchar(20) NOT NULL, 9 customer nvarchar(100) NOT NULL, 10 created_at DateTime NOT NULL, 11 updated_at DateTime NOT NULL, 12 CONSTRAINT PK_invoices PRIMARY KEY (id) 13); 14...

We have same SQL Scripts to try to find out about what it happens when we have or had deadlocks. Get current running commands. Create event to find blocked processes and deadlocks. Sources : Deadlocking https://technet.microsoft.com/en-us/library/ms177433%28v=sql.105%29.aspx How to isolate the current running commands...