Export (0) Print
Expand All
Expand Minimize

MSSQLSERVER_1205

Product Name

SQL Server

Product Version

10.50

Product Build Number

10.50.0000.00

Event ID

1205

Event Source

MSSQLSERVER

Component

SQLEngine

Symbolic Name

LK_VICTIM

Message Text

Transaction (Process ID %d) was deadlocked on %.*ls resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Resources are accessed in conflicting order on separate transactions, causing a deadlock. For example:

  • Transaction1 updates Table1.Row1, while Transaction2 updates Table2.Row2.

  • Transaction1 tries to update Table2.Row2 but is blocked because Transaction2 has not yet committed.

  • Transaction2 now tries to update Table1.Row1 but is blocked because Transaction1 has not committed.

  • A deadlock occurs because Transaction1 is waiting for Transaction2 to complete, but Transaction2 is waiting for Transaction1 to complete.

The system will detect this deadlock and will choose one of the transactions involved as a 'victim' and will issue this message, rolling back the victim's transaction. For more information about deadlocks, see Deadlocking.

Execute the transaction again. You can also revise the application to avoid deadlocks. The transaction that was chosen as a victim can be retried and will likely succeed, depending on what operations are being executed simultaneously.

To prevent or avoid deadlocks from occurring, consider having all transactions access rows in the same order (Table1, then Table2); this way, although blocking might occur, a deadlock will not occur. For more information about actions to take, see Detecting and Ending Deadlocks.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft