1205 SQL Origin: Data OSI layer 7 · Application Last updated 18 Nov 2026

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.

Exact message you may see 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
Seen on: SQL Server SQL

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

  1. Retry on error 1205
  2. Use consistent access order and shorter transactions
  3. Enable RCSI and review the deadlock graph

Detailed fix by platform

SQL

  1. ALTER DATABASE MyDb SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE;

How to diagnose

  1. Deadlock graph — Captured?
  2. Index — Missing?
  3. 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:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

1213 — MySQL ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction (MySQL)12131222 — SQL Server Msg 1222: Lock request time out period exceeded (SQL)1222209 — SQL Server Msg 209: Ambiguous column name (SQL)209266 — SQL Server Msg 266: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements (SQL)2663902 — SQL Server Msg 3902: The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION (SQL)3902Deadlock — Deadlock found when trying to get lock; try restarting transaction (SQL)Deadlockisolation — Inconsistent results inside a transaction: non-repeatable and phantom reads (isolation level) (SQL)isolationLock wait timeout — Lock wait timeout exceeded; try restarting transaction (MySQL 1205) (SQL)Lock wait timeout1205

Explore the map of this error Full error map →

🧠 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.