Error code

SQL Server 1205

SQL SERVER1205
Database Error Code· An error code returned by a database server such as PostgreSQL or MySQL.

What it means

transaction was deadlocked and chosen as the deadlock victim — rolled back.

How to fix it

  1. Retry the rolled-back transaction after a short random delay.
  2. SQL Server selects the cheapest victim automatically.
  3. Ensure all sessions acquire locks on objects in the same consistent order to prevent cycles.
  4. Keep transactions short and acquire row-level locks with appropriate isolation to reduce contention.

Not affiliated with SQL Server. Answer summarized from the manufacturer's manual linked above; consult that source for the authoritative procedure.