DBMS_LOCK module

The DBMS_LOCK module provides lock management functions that SQL PL developers can use to control concurrent access to critical resources in their applications.

The schema for this module is SYSIBMADM.

The DBMS_LOCK module includes the following routines.

Table 1. Built-in routines available in the DBMS_LOCK module
Routine Name Description
ALLOCATE_UNIQUE procedure - Allocates unique lock handle for specified lock name Allocates a unique lock handle for the specified lock name.
SLEEP procedure - Suspends execution of current session for specified duration Suspends the execution of the current session for the specified duration.
REQUEST function - Requests a lock based on the lock ID or lock handle Requests a lock based on the specified lock ID or specified lock handle.
CONVERT function - Converts the lock mode of an acquired lock Converts the lock mode to a new lock mode.
RELEASE function - Releases an acquired lock Releases an acquired lock.