INF: Deadlock Scenarios and Avoidance in SQL (47162)
The information in this article applies to:
- Microsoft SQL Server 4.2x
This article was previously published under Q47162 SUMMARY
This article describes common deadlock scenarios and avoidance
techniques.
In the classic deadlock, a transaction locks record 1 and later locks
record 2. If a second transaction attempts to lock the same two
records, but in the opposite order, and happens to run just after the
first transaction acquired its first lock, a deadlock occurs.
In a single-server environment, SQL Server detects this kind of
deadlock and abnormally terminates one of the transactions. If a
single client application is performing updates on multiple SQL
servers, permanent deadlocks are possible because the participating
SQL Servers do not communicate with each other regarding lock status
and requests. This is true even if 2 phase commit service is being
used.
Modification Type: | Major | Last Reviewed: | 3/9/1999 |
---|
Keywords: | kbother KB47162 |
---|
|