TABLE 9-1
Lock Compatibility of Exclusive and Shared Locks
Requested Mode
Granted Exclusive (X)
Granted Shared (S)
Grant request for exclusive?
No
No
Grant request for shared?
No
Yes
A “No” in the intersection means that the locks are incompatible and the requested mode is de-
nied; the requester must wait. A “Yes” in the intersection means that the locks are compatible and the
requested mode is accepted.
The following summarizes lock interaction between transactions in simple terms: data that was
modified by one transaction can neither be modified nor read (at least by default in an on-premises
SQL Server installation) by another transaction until the first transaction finishes. And while data is
being read by one transaction, it cannot be modified by another (at least by default in an on-premises
SQL Server installation).
www.it-ebooks.info
302
Microsoft SQL Server 2012 T-SQL Fundamentals
Do'stlaringiz bilan baham: |