- You have a database that has the options ALLOW_SNAPSHOT_ISOLATION and READ_COMMITTED_SNAPSHOT enabled in Microsoft SQL Server 2008 R2.
- You run a SELECT statement that contains TABLOCK and UPDLOCK hints against a table in the database.
- The SELECT statement is wrapped in an explicit BEGIN TRAN, but COMMIT TRAN is not executed.
- Two more of the same queries that are started with the same query hints are in the explicit transaction.
- When ALLOW_SNAPSHOT_ISOLATION and READ_COMMITTED_SNAPSHOT are enabled for a database, multiple queries against the same transaction may be reported as deadlocked incorrectly when one of them is completed.
- When ALLOW_SNAPSHOT_ISOTION is enabled and the hints TABLOCK and UPDLOCK are used, the second and third SELECT statement take IX locks with the intent to convert to X. The IX locks end up deadlocking when an attempt to convert to X is made.
- When ALLOW_SNAPSHOT_ISOLATION is disabled, the second and third queries will obtain a SIX lock. In this situation, when the SIX lock is converted to X, it is just a blocking scenario, not a deadlock.
After you apply the hotfix, SQL Server resolve the issue by recording if a READ COMMIT hint or NOLOCK hint is encountered for the database and query. This information is used to select the correct type of locks to handle the situation correctly, instead of incorrectly report deadlock.
Article ID: 2929464 - Last Review: Feb 18, 2014 - Revision: 1