The SAP DB database system is a complete transactional implementation that allows concurrent transactions to access the same database objects. To ensure synchronization and isolation of individual transactions, lock mechanisms are required.
The basic idea behind a lock mechanism is that the transaction locks as many of the database objects it is using for as long as is required to ensure the transaction is executed correctly.
Locking an object means that other transactions are not able to use it in certain ways.
The more locks that are set, and the longer these stay in place, the less concurrency is possible in database operation. For this reason, locks should only be set if they are absolutely necessary, and locks that have been set should be released as soon as possible.
· Lock mechanisms differ according to the type of lock selected.
· Locks can be requested and released implicitly and explicitly (Requesting and Releasing a Lock).
·
Locks can be
set at row, table, and database catalog level.
If too many row locks (shared or exclusive locks) are requested by a
transaction for a table, the database system attempts to lock the table. If
this causes collisions with other locks, the database system continues to
request row locks. This means that table locks are obtained without waiting
periods. The limit beyond which the system attempts to transform row locks
into table locks depends on the general database
parameter MAXLOCKS.