Skip Headers
Oracle® TimesTen In-Memory Database Reference
Release 11.2.1

Part Number E13069-03
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF



Allows an application to change the lock timeout interval of the current connection. The change takes effect immediately and applies to all subsequent statements in the current transaction, as well as all subsequent transactions on the connection.

The lock wait interval is the number of seconds to wait for a lock when there is contention on it. You can also indicate a fraction of a second.

Lock wait intervals are imprecise, and may be exceeded, generally by no more than 100 milliseconds, due to the scheduling of the agent that detects timeouts. This imprecision does not apply to zero second timeouts, which are always reported immediately.

If AutoCommit is off at the time that ttLockWait is called, the application must commit the transaction in which ttLockWait is executed.

Required privilege

This procedure requires no privilege.




ttLockWait has the required parameters:

Parameter Type Description
seconds NUMBER (8,1) NOT NULL Number of seconds to wait for a lock when there is contention on it. You can also specify fractions of a second. Values between 0.0 and 1000000.0 inclusive are accepted.

Result set

ttLockWait returns no results.


To indicate a six second lock wait, use:

CALL ttLockWait (6);

To indicate a tenth of a second lock wait, use:

CALL ttLockWait (0.1);


When a lock is not immediately available to a TimesTen transaction, it waits a predetermined amount of time to try and get the lock. After that it times out the lock request and returns TimesTen error 6003 to the application. By default, TimesTen uses a value of 10 seconds for lock timeouts.

Of special interest is the lock time-out interval value of 0. If that value is specified, transactions do not wait for any unavailable locks. If the lock is not available, the request returns with TimesTen error 6003.

See also