SQL Server Msg 1205: Transaction was deadlocked on lock resources and has been chosen as the deadlock victim
Two sessions each hold locks the other needs, so SQL Server rolled one of them back.
Transaction (Process ID) was deadlocked on lock resources with another process and has been chosen as the deadlock victimMsg 1205 deadlock victimRerun the transactionSqlException 1205 deadlockdeadlock victim SQL Server Meaning
Retry the victim transaction, keep transactions short, access tables in the same order, add missing indexes so fewer rows are locked, and consider READ_COMMITTED_SNAPSHOT. Capture the deadlock graph (Extended Events xml_deadlock_report) to see the exact statements.
Common causes
- Transactions touching tables in opposite order
- Missing index causing scans and wide locks
- Long transactions
- Lock escalation
- Read-then-update patterns
⚡ Quick fix
- Retry on error 1205
- Use consistent access order and shorter transactions
- Enable RCSI and review the deadlock graph
Detailed fix by platform
SQL
ALTER DATABASE MyDb SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;
How to diagnose
- Deadlock graph — Captured?
- Index — Missing?
- Access order — Consistent?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in SQL
Other ways to find it
Where this error sits
Origin: Data. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 18 Nov 2026