dataiotech Labs
dbaguidedbaguideDBAdataxtoolsdataopsphere
Home/Error Library/sqlserver-1205-deadlock-victim
SQL Server
SQL Server 2019 / 2022Lock & Deadlock
5 min read
Error 1205: Transaction was deadlocked and chosen as the deadlock victim

SQL Server Error 1205: "Deadlock victim" — Where to Find the Graph?

Extracting the deadlock graph from the system_health Extended Events ring buffer, understanding victim election, and architectural resolution.

Reviewed by:Senior Database Architect & SRE (dataiotech Labs)
Tested Versions: SQL Server 2019 / 2022
First 60 Seconds Emergency Protocol:

The error string is a symptom, not the root cause. Do not restart the server blindly. Run the diagnostic queries below to pinpoint the actual failure mode.

▸Symptom

plaintext
Transaction (Process ID 87) was deadlocked on lock resources and has been chosen as the deadlock victim.

SQL Server automatically logs deadlock XML graphs in the default system_health Extended Events session.


▸Extract Deadlock Graph via SQL

sql
SELECT CAST(t.target_data AS XML) AS deadlock_xml FROM sys.dm_xe_session_targets t JOIN sys.dm_xe_sessions s ON s.address = t.event_session_address WHERE s.name = 'system_health' AND t.target_name = 'ring_buffer';

▸Mitigations

  1. 1Enable Read Committed Snapshot Isolation (RCSI): ALTER DATABASE db_name SET READ_COMMITTED_SNAPSHOT ON;
  2. 2Enforce consistent object access ordering in application logic.
  3. 3Lower priority on analytical queries: SET DEADLOCK_PRIORITY LOW;
  • •Validated versions: SQL Server 2019 / 2022

Other Database Error Triage Playbooks

Other battle-tested diagnostic guides for high-severity database errors.

All Errors (20)