The information in this article applies to:
SYMPTOMS
You may run into a deadlock when using the UPDLOCK hint. Consider the
following example:
Then user B starts another transaction with the same commands (this transaction will be blocked by user A):
Now if user A issues the following UPDATE within the same transaction
The following error will occur if there is no index for TAB1:
CAUSEThe same update lock is promoted to a table lock when there is no index for a table. Or, when the UPDATE statement is unrestricted, a previous Update_page lock is promoted to a lock type Ex_table. If another transaction already placed an Ex_intent lock on the same table, the lock escalation cannot succeed and the deadlock is detected. WORKAROUND
To work around this problem, do either of the following:
MORE INFORMATION
For more information, see the following article in the Microsoft Knowledge
Base:
Q169960 : INF: Analyzing and Avoiding Deadlocks in SQL Server
Keywords : SSrvLock |
Last Reviewed: April 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |