In this tutorial, add deadlocks to the RLV store, log the deadlocks for reporting purposes, and report deadlock information using sa_report_deadlocks.
This tutorial creates a cycle between two transactions in order to create the deadlock:
These releases will never happen, since each transaction is waiting on a resource currently held by the other transaction. This is a classic deadlock scenario. The database server prevents user statements from inducing a deadlock scenario and automatically rolls back the transaction for the statement that introduced the deadlock.