Calls
-
PROCEDURE DBMS_LOCK.ALLOCATE_UNIQUE(locknameIN VARCHAR2,lockhandleOUT VARCHAR2,expiration_secsIN INTEGER DEFAULT 864000); Allocates a unique lockhandle for the lock identified by lockname to last for expiration_secs seconds. Also performs a COMMIT.
-
FUNCTION DBMS_LOCK.CONVERT({idIN INTEGER |lockhandleIN VARCHAR2},lockmodeIN INTEGER,timeoutIN NUMBER DEFAULT MAXWAIT)RETURN INTEGER; Converts the lock identified by either id or lockhandle to the mode specified by lockmode, waiting for up to timeout seconds for successful completion. lockmode must be a valid constant as defined in the DBMS_LOCK package. Return values are 0 = success; 1 = timed out; 2 = deadlock; 3 = parameter error; 4 = do not own lock, cannot convert; or 5 = illegal lockhandle.
-
FUNCTION DBMS_LOCK.RELEASE({idIN INTEGER |lockhandleIN VARCHAR2})RETURN INTEGER; Releases the lock identified by either id or lockhandle. Return values are the same as for the CONVERT function.
-
FUNCTION DBMS_LOCK.REQUEST({idIN INTEGER |lockhandleIN VARCHAR2},lockmodeIN INTEGER DEFAULT X_MODE,timeoutIN INTEGER DEFAULT MAXWAIT,release_on_commitIN BOOLEAN DEFAULT FALSE)RETURN INTEGER; Acquires the lock identified by either id or lockhandle in the mode specified by lockmode, waiting for up to timeout seconds for successful completion. When release_on_commit is TRUE, the lock is automatically released as the result of the transaction COMMIT or ROLLBACK. lockmode must be a valid constant as defined in the DBMS_LOCK ...