Show TOC

Object documentationLock Table Locate this document in the navigation structure

 

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.

 

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 (more information: Collision Check for Locks). If this is the case, the request is rejected. Otherwise, the new lock is written to the lock table.

Note Note

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

End of the note.

Structure

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

The structure of the lock entries is shown below.

This graphic is explained in the accompanying text.

The individual fields have the following meaning:

Field

Contents and meaning

Owner_1

Owner ID and cumulation counter for owner_1: The ID contains the host name, the work process, a time stamp, and 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 if 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)

There are also lock modes U, V, and W. These only perform the collision check, but do not set a lock, and cannot therefore appear in the lock table. For more information about working with these modes, refer to: Example: Using Lock Modes U, V, and W.

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. More information: Managing Lock Entries.