SET TABLE TIMEOUT Statement
•
"Syntax Description of SET TABLE TIMEOUT"
•
"Considerations for SET TABLE TIMEOUT"
•
"Examples of SET TABLE TIMEOUT"
The SET TABLE TIMEOUT statement sets a dynamic timeout value for a lock timeout or a stream
timeout in the environment of the current session. The dynamic timeout value overrides the
compiled static timeout value in the execution of subsequent DML statements.
SET TABLE TIMEOUT is a Neoview SQL extension.
To set the lock timeout
SET TABLE { * | table } TIMEOUT { value | RESET }
To set the stream timeout
SET TABLE * STREAM TIMEOUT { value | RESET }
Syntax Description of SET TABLE TIMEOUT
TABLE { * | table }
specifies the name of the table.
An asterisk (*) specifies all tables accessed in the current session. This option clears all previous
dynamic timeout settings for specific tables in the current session.
NOTE:
timeout option, you must use the asterisk (*) option.
TIMEOUT value
specifies that value is for a lock timeout. If value elapses before a DML statement can
acquire a lock on a table, the statement fails, and Neoview SQL returns file-system error 73
(disk file or record is locked).
STREAM TIMEOUT value
specifies that value is for a stream timeout. A query that tries to access an empty stream
waits until value elapses before Neoview SQL returns:
*** ERROR[8006] The stream timed out, but the cursor is still open.
value
specifies the timeout value in hundredths of seconds.
Specify value as a:
•
Numeric value (for example, 3000)
•
String with single quotation marks (for example, '-1')
•
Parameter
The range is between -1 and 2147483519, expressed in hundredths of seconds. The value -1
represents an infinite timeout and directs Neoview SQL not to time out.
A value of zero (0) directs Neoview SQL not to wait. If a table lock cannot be acquired or if
a stream is empty, Neoview SQL immediately times out.
186
SQL Statements
The table option is supported only for the lock timeout option. For the stream