User Guide
SAP AG November 2002
A transaction has a
E lock S lock E lock S lock E lock S lock
Can another transaction
transaction
On a table On a row On the database
catalog
Request an E lock for
the table?
Request an S lock for
the table?
No
No
No
Yes
No
No
No
Ye s
No
No
Yes
Yes
Request an E lock for
any line of the table?
Request an E lock for
the locked row?
Request an E lock for
another row?
No
---
---
No
---
---
---
No
Yes
---
No
Ye s
No
---
---
Yes
---
---
Request an S lock for
any row of the table?
Request an S lock for
the locked row?
Request an S lock
for another row?
No
---
---
Yes
---
---
---
No
Yes
---
Ye s
Ye s
No
---
---
Yes
---
---
Change the definition of the table
in the database catalog?
Change the definition of the table
in the database catalog?
No
Ye s
No
Yes
No
Yes
No
Ye s
No
No
No
Yes
A lock collision exists in the cases which are marked with "No"; i.e., after having requested a
lock within a transaction, the user must wait for the lock to be released until one of the above
situations or one of the situations that are marked with "Yes" in the matrix occurs.
• If no lock has been assigned to a transaction for a data object, then a shared or exclusive
lock can be requested within any transaction and the lock is immediately assigned to the
transaction.
• If a shared lock has been assigned to a transaction T for a data object, and if no lock has
been assigned to any concurrent transaction for this data object, then the transaction T
can request an exclusive lock for this data object and the lock is immediately assigned to
this transaction.
• If an exclusive lock has been assigned to a transaction for a data object, then a shared
can, but need not, be requested for this transaction.
Shared Lock
One type of is the shared lock. lock [Page 140]
User Manual: SAP DB 114










