Entering content frame

Background documentation Type of Lock Locate the document in its SAP Library structure

The database system differentiates between the following locks:

·        Shared lock

·        Exclusive lock

·        Optimistic lock

·        Special locks for he metadata of the database catalog, which must, however, always be explicitly assigned.

The following table provides an overview of the possible parallel shared locks (S locks) and exclusive locks (E locks).

 

This graphic is explained in the accompanying text

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.

The following also applies:

·        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.

 

Leaving content frame