SET STATEMENT TIMEOUT
Sets the statement timeout for a connection
SET STATEMENT TIMEOUT value [<time-unit>] <time-unit> ::= SECOND | MILLISECOND | MINUTE | HOUR
| Parameter | Description |
|---|---|
value |
The timeout duration expressed in time-unit.A value of |
time-unit |
Time unit of the timeout.Defaults to |
The SET STATEMENT TIMEOUT sets a statement timeout at connection level and takes effect immediately.The statement can run outside transaction control (without an active transaction).
Setting a value larger than configured for the database is allowed, but is effectively ignored, see also [fblangref50-management-stmnt-timeout-effective].
The current statement timeout set for the session can be retrieved through RDB$GET_CONTEXT, namespace SYSTEM and variable STATEMENT_TIMEOUT.Information is also available from MON$ATTACHMENTS:
MON$STATEMENT_TIMEOUT-
Connection-level statement timeout in milliseconds;
0if timeout is not set.
In MON$STATEMENTS:
MON$STATEMENT_TIMEOUT-
Statement-level statement timeout in milliseconds;
0if timeout is not set. MON$STATEMENT_TIMER-
Timeout timer expiration time;contains
NULLif an idle timeout was not set, or if a timer is not running.
Both RDB$GET_CONTEXT('SYSTEM', 'STATEMENT_TIMEOUT') and MON$ATTACHMENTS.MON$STATEMENT_TIMEOUT report the statement timeout configured for the connection, and MON$STATEMENTS.MON$STATEMENT_TIMEOUT for the statement;they do not report the effective statement timeout.
The statement timeout is reset when [fblangref50-management-session-reset-alter] is executed.