Lock Table

Definition

A table in the main memory of the enqueue server that records the current locks in the system.

For each elementary lock, the table specifies the owner, lock mode, name, and the fields in the locked table.

Use

The lock table is used to manage locks. Every time the enqueue server receives a lock request, the system checks the lock table to determine whether the request collides with an existing lock (see Lock Collisions). If this is the case, the request is rejected. Otherwise, the new lock is written to the lock table.

Locks in the lock table are not set at database level.

Structure

Each elementary lock corresponds to a data record in the lock table.

The structure of the lock entries is shown below.

The individual fields have the following meaning:

Field

Contents and meaning

Owner_1

Owner ID and cumulation counter of owner_1: the ID contains the computer name, the work process, and a timestamp. It is also used to identify the SAP LUW. The cumulation counter specifies how often the owner has already set this elementary lock. 

Owner_2

The above applies here to owner_2

Backup ID

Backup ID (index indicating where the lock entry is stored in the backup file) and backup flag (0 (no backup) or 1 (backup)). If you set the backup indicator, the system saves the lock to disk when the lock server is restarted.

Elementary lock

Lock mode

S (Shared lock)

O (Optimistic lock)

E (Exclusive lock)

X (eXclusive lock, extended exclusive lock, cannot be cumulated)

Name

Name of the database table in which fields are to be locked

Argument

Locked fields in the database table (linked key fields, can also contain wildcards)

Integration

You can view the lock entries for diagnosis purposes. For more information see Managing Lock Entries.