The DBMS_LOCK package provides an interface for the lock management services of OceanBase Database.
You can request a lock of a specific mode, give the lock a unique name that is recognizable in another procedure in the same or another instance, change the lock mode, and release the lock.
Privileges
The operating system may impose an upper limit on the maximum number of available locks. When you use locks or provide this package to other users, consider granting the EXECUTE privilege only to specific users or roles.
Subprograms
The following table describes the DBMS_LOCK subprograms supported by the current OceanBase Database version.
| Subprogram | Description |
|---|---|
| SLEEP | Suspends the current session for a specific amount of time. |