ALLBASE/SQL Reference Manual (36216-90216)

Chapter 2 97
Using ALLBASE/SQL
Using Multiple Connections and Transactions with Timeouts
Setting Timeout Values
Be sure to set a timeout value when using multiple connections to avoid undetected
deadlocks and undetected wait conditions. An undetected deadlock is possible when
multi-transaction mode is used in conjunction with more than one DBEnvironment with
multiple applications accessing the same DBEnvironments at the same time. An
undetected wait condition is possible when multi-transaction mode is used with multiple
connections to the same DBEnvironment within a single ISQL session or application.
A timeout value can be set with any of the following:
START DBE
START DBE NEW
START DBE NEWLOG
SQLUtil ALTDBE
SET USER TIMEOUT
SET SESSION USER TIMEOUT
SET TRANSACTION USER TIMEOUT
The first four methods provide a means of setting timeout values at the DBEnvironment
level. The SET USER TIMEOUT statement provides a way of setting transaction, session, or
application specific timeout values. The range of possible values is zero (no wait) to the
specified maximum in the DBECon file for a given DBEnvironment.
For a multi-connect application operating in multi-transaction mode, it is
essential
to
use the SET USER TIMEOUT statement to avoid an undetectable deadlock or wait condition.
For information regarding transaction modes, see the following section, “Setting the
Transaction Mode.