ALLBASE/SQL Reference Manual (36216-90216)

548 Chapter12
SQL Statements S - Z
SET USER TIMEOUT
SET USER TIMEOUT
The SET USER TIMEOUT statement specifies the amount of time the user will wait if the
requested database resource is unavailable.
Scope
ISQL or Application Programs
SQL Syntax
SET USER TIMEOUT [TO] {{
TimeoutValue
:HostVariable
}[SECONDS
MINUTES]
DEFAULT
MAXIMUM }
Parameters
TimeoutValue
is an integer literal greater than or equal to zero. If the
TimeoutValue
is
not qualified by MINUTES, SECONDS is assumed. If representing
seconds,
TimeoutValue
must be in the range of 0 to 2,147,483,647. If
representing minutes,
TimeoutValue
must be in the range of 0 to
35,791,394.
HostVariable
identifies an integer host variable containing a timeout value.
DEFAULT indicates that the user timeout value will be set to the default timeout
value specified by the database administrator.
MAXIMUM indicates that the user timeout value will be set to the maximum timeout
value specified by the database administrator.
Description
The value specified by SET USER TIMEOUT remains in effect only for the duration of
the user's session and only affects that session, and does not modify the value stored in
the DBECon file.
Database resources that may cause a user to wait include the following:
Locks The user attempts to lock a database object that is already locked by
another transaction in a conflicting mode.
Transaction Slots The application tries to begin a transaction but the maximum
number of transactions allowed has been reached. ALLBASE/SQL
creates an implicit, brief transaction when the CONNECT statement is
issued.
If the
TimeoutValue
is zero and the database resource is unavailable, the user will not
wait and an error will occur. To implement locking with no waiting, set the
TimeoutValue
to zero.