Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

HOLDLOCK along with UPDLOCK Expand / Collapse
Author
Message
Posted Thursday, January 10, 2013 10:32 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, March 27, 2014 11:01 AM
Points: 60, Visits: 226
Hi,

Using either HOLDLOCK or UPDLOCK as a lock hint allows other transactions to see the data, but, when used together, the other transactions cannot see the data until the previous transaction is completed.

Can anyone shed some light on what happens when these locks are used together, and what happens.


Thanks.
Post #1405553
Posted Thursday, January 10, 2013 11:53 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:44 AM
Points: 42,822, Visits: 35,953
The update lock is held until the transaction commits or rolls back.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1405582
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse