IBM data server driver configuration keywords for reconnect support
There are IBM® data server driver configuration
keywords available for configuring and disabling the auto-reconnect feature of the Db2 client without configuring either workload balancing (WLB) or automatic client reroute
(ACR) in the db2dsdriver.cfg file
Note: The
Table 1 describes the settings in the maxReconnectRetries and reconnectRetryInterval
configuration keywords are available in Db2®
12.1.4 and
later.db2dsdriver.cfg file for
enabling and disabling the ability to reconnect with a database:db2dsdriver configuration file
elements(located in the database/dsn/global section) |
Values |
|---|---|
| maxReconnectRetries | The maximum number of connection attempts to server is greater than or equal to zero. The
default value is one (1). Setting the maxReconnetRetries parameter to zero (0)
disables this feature. |
| reconnectRetryInterval | The number of seconds to wait between connection retries. The valid range is greater than or
equal to zero. The default value is five (5). The keyword is effective only if the value of the
maxReconnectRetrieskeyword is greater than one (1) |
If the maxReconnectRetries and reconnectRetryInterval keywords
and not configured in db2dsdriver.cfg file, then the retry interval is set to one
(1) when the feature is enabled by default by the IBM Data Server Driver for
ODBC and CLI.
Restrictions
The following restrictions apply when configuring the reconnect feature for clients:
- After the total number of retries have run, if the driver fails to establish a connection with the database, then driver returns an SQL30081N error. This message is generated when there is a communication error.
- The
maxReconnectRetriesandreconnectRetryIntervalkeywords values are effective under the following conditions:- Either WLB or ACR is not configured for a database or DSN in the
db2dsdriver.cfgfile. - The statement being run is the first SQL operation of a transaction.
- The statement being run is not the first SQL operation in the transaction, but the transaction is read-only and the result set is available in the client or application side from the Db2 Server. If the result set is not available on the client or application, the driver generates an SQL30108N error. This error is generated when a reconnect operation is successful, but the driver cannot rerun the failed SQL successfully.
- Either WLB or ACR is not configured for a database or DSN in the