Microsoft Knowledge Base Email Alertz

FIX: A Deadlock occurs when two transactions try to perform a DML operation on a table that contains a TABLOCK locking hint or an XLOCK locking hint

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 983516 - Last Review: August 25, 2010 - Revision: 2.0

FIX: A Deadlock occurs when two transactions try to perform a DML operation on a table that contains a TABLOCK locking hint or an XLOCK locking hint

Hotfix download is availableHotfix Download Available
View and request hotfix downloads

On This Page

SYMPTOMS

Consider the following scenario in Microsoft SQL Server Compact 3.5:
  • You have two transactions of serializable isolation.
  • Both transactions try to perform a DML operation (query/DML) on the same table that contains a TABLOCK locking hint or an XLOCK locking hint.
In this scenario, you encounter a deadlock.

CAUSE

This issue occurs because both transactions wait for one another for XLOCK. When the query gets compiled, both transactions obtain the shared lock on the table and then holds the lock for serializable isolation. When both transactions try to perform an execute, the query on the same table that contains an XLOCK locking hint, then both transactions wait for one another for XLOCK. Therefore, a deadlock occurs.

Note This issue also occurs when both transactions perform a DML operation on the same table that contains a TABLOCK locking hint.

RESOLUTION

SQL Server Compact 3.5 Service Pack 2

The fix for this issue was first released in Cumulative Update 2. For more information about how to obtain this cumulative update package for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:
2289547  (http://kbalertz.com/Feedback.aspx?kbNumber=2289547/ ) Cumulative Update 2 for SQL Server Compact 3.5 Service Pack 2

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about Deadlock, visit the following Microsoft Developer Network (MSDN) website:
Deadlock (http://msdn.microsoft.com/en-us/library/ms172453.aspx)
For more information about DML, visit the following MSDN website:
DML (http://msdn.microsoft.com/en-us/library/ms174439.aspx)
For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684  (http://kbalertz.com/Feedback.aspx?kbNumber=824684/ ) Description of the standard terminology that is used to describe Microsoft software updates

APPLIES TO
  • Microsoft SQL Server Compact 3.5
Keywords: 
kbqfe kbhotfixserver kbexpertiseadvanced kbsurveynew kbautohotfix KB983516
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate