Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 
CreamKids Christmas Cushion Covers


Difference Between Update Lock and Exclusive Lock
Question Posted on 13 Jul 2011

Home >> DataBase >> sql questions >> Difference Between Update Lock and Exclusive Lock




When Exclusive Lock is on any processes no other lock can be placed on that row or table. Every other process have to wait till Exclusive Lock is complete its tasks.

When two transactions doing shared mode locks on same (row or table) and then trying to update data concurrently when first transaction attempts the lock conversion to an exclusive lock. The shared mode to exclusive lock conversion must wait because the exclusive lock for first transaction is not compatible with the shared mode lock of the other transaction a lock wait occurs. The second transaction attempts to acquire an exclusive lock for its update. Now both transactions are converting to exclusive locks and they are each waiting for the other transaction to release its shared mode lock then deadlock occurs.To avoid this deadlock problem update locks are used. Only one transaction can obtain an update lock to a (row or table) at a time. If a transaction trying to modifies a row or table the update lock is converted to an exclusive lock else the lock is converted to a shared mode lock.
0
0



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
Define N in nvarchar and in nchar?
difference between drop and truncate command
difference between procedure and function
different types of databases in sql
Difference Between Update Lock and Exclusive Lock






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |