Two sessions in a deadlock: Session A updates Tea then Honey, Session B updates Honey then Tea, each waits for a lock the other holds, Session A gets error 1205 and retries, and the saved run shows try 1 error 1205 after 3,939 ms and try 2 committed with Tea 98 and Honey 102

Retrying a Deadlock Victim: When the Retry Helps and When It Hurts

Retrying a deadlock victim works when the retry repeats the whole transaction. This post builds a bounded T-SQL retry for error 1205 and tests it against a real deadlock between two sessions. It then shows two cases where a retry does harm: inside an outer transaction and on an error that is not a deadlock. Every result comes from SQL Server 2025.

Read More