SQL Server Error 1205 — Transaction was deadlocked on resources
Transaction (Process ID) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
This means two (or more) transactions each held a lock the other needed, and SQL Server killed one of them (the "victim," usually the one with the least work invested) to break the cycle.
Common causes
- Two transactions accessing the same tables in a different order (classic deadlock pattern)
- Missing or non-covering indexes forcing wider locks (table/page scans instead of targeted row locks)
- Long-running transactions holding locks longer than necessary
- High-concurrency INSERT/UPDATE on a hot table without appropriate isolation level
How to fix it
- Capture the deadlock graph (Extended Events system_health session, or trace flag 1222 for the error log).
- Identify the two competing queries and the resource (usually a specific index key) they both wanted.
- Standardize the access order — make every transaction touch tables in the same sequence.
- Add or fix indexes so each query takes the narrowest possible lock.
- Wrap retry logic around deadlock-prone transactions (TRY/CATCH + retry on error 1205) as a safety net — not a substitute for fixing the root cause.
Paste your own deadlock XML here for an instant, plain-English breakdown of exactly which queries and resources were involved.
Try deadlock analyzer free →