3 DBMS_LOCK
The DBMS_LOCK package provides an interface to Lock Management services. TimesTen supports only the SLEEP subprogram.
This chapter contains the following topics:
Using DBMS_LOCK
TimesTen currently implements only the SLEEP subprogram, used to suspend the session for a specified duration.
DBMS_LOCK Subprograms
TimesTen supports only the SLEEP subprogram. Table 3-1 summarizes that subprogram, followed by a full description.
Table 3-1 DBMS_LOCK Package Subprograms
| Subprogram | Description |
|---|---|
|
Suspends the session for a specified duration. |
SLEEP Procedure
This procedure suspends the session for a specified duration.
Syntax
DBMS_LOCK.SLEEP (
seconds IN NUMBER);Parameters
Table 3-2 SLEEP Procedure Parameters
| Parameter | Description |
|---|---|
|
|
Amount of time, in seconds, to suspend the session, where the smallest increment is a hundredth of a second |
Usage Notes
-
The actual sleep time may be somewhat longer than specified, depending on system activity.
-
If the
PLSQL_TIMEOUTgeneral connection attribute is set to a positive value that is less than this sleep time, the timeout takes effect first. Be sure that either the sleep value is less than the timeout value, orPLSQL_TIMEOUT=0(no timeout). See PL/SQL Connection Attributes in Oracle TimesTen In-Memory Database PL/SQL Developer's Guide for information aboutPLSQL_TIMEOUT.
Examples
DBMS_LOCK.SLEEP(1.95);