Well, let us discuss Detecting Deadlocks in SQL Server Using Trace Flags 1204 and 1222. T-SQL for enabling, disabling, and checking the status of these trace flags.
Understanding SQL Server Deadlocks: A Beginner’s Guide
Welcome to this introductory blog post on SQL Server Deadlocks. In this post, we’ll help you understand what deadlocks are, and how they occur.
Deadlock Victim Selection: Protect One Transaction
Deadlock victim selection decides which of two blocked transactions SQL Server rolls back. This post shows the rules, sets DEADLOCK_PRIORITY on one procedure, reproduces a deadlock with two query windows, and shows what the setting cannot do. It ends with the two fixes that remove the deadlock itself.
Reading Deadlock Graphs From the system_health Session
Read deadlock graphs from system_health, identify victims and resource owners, reproduce a two-session cycle, and choose a targeted fix.
SQL SERVER – A Brief History of Deadlock and Modern Approach of Resolution
A deadlock investigation needs the graph and cooperation between DBAs and developers. I distinguish a blocking wait from a cyclic dependency.
Upsert Patterns in SQL Server Without Race Conditions
Compare upsert patterns under concurrent calls, protect missing-key ranges, test MERGE with HOLDLOCK, and keep unique keys as a guard.







