User Guide
SAP AG November 2002
procedure, page entries are moved to new locations and page pointers are redirected. As a
result, data pages are used more efficiently.
Uniform distribution of data prevents individual data regions from overflowing. The only
restriction on the size of tables is the storage space available in the database system.
Lock Behavior
The database system SAP DB allows concurrent transactions [Page 152] to use the same
database objects. To ensure synchronization and isolation of individual transactions, lock
mechanisms are required.
Lock Behavior
• Lock mechanisms differ according to the type of
The basic idea behind a lock mechanism is that the transactions lock 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 [Page
140] selected.
• Locks can be requested and released implicitly and explicitly (Requesting and Releasing
a Lock [Page 115]).
• 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 database parameter MAXLOCKS
[Page 85].
Lock
The 113 depends among other things on the type of lock. Tables and
rows are locked in a
152 with a defined lock mode (
115 ).
lock behavior [Page ]
transaction [Page
] Requesting and
Releasing a Lock [Page ]
The database system differentiates between the following locks:
Shared lock [Page
114]
•
Exclusive lock [Page
115]
115
•
Optimistic lock [Page
]
•
• Special locks for he metadata of the
, which must, however,
always be explicitly assigned.
database catalog [Page
131]
The following table provides an overview of the possible parallel shared locks (S locks) and
exclusive locks (E locks).
User Manual: SAP DB 113










