DB2 Version 9.7 for Linux, UNIX, and Windows

ConnectionTimeout IBM Data Server Driver configuration keyword

Specifies the time in seconds to wait for a reply when trying to establish a connection to a server before terminating the attempt and generating a communication timeout.

Equivalent CLI keyword
ConnectTimeout
Equivalent IBM® Data Server Provider for .NET connection string keyword
Timeout
db2dsdriver.cfg configuration syntax
<parameter name="ConnectionTimeout" value="0 | 1 |2 | ... | 32767"/>
Default setting:
The client waits indefinitely for a reply from the server when trying to establish a connection.
Equivalent connection attribute:
SQL_ATTR_LOGIN_TIMEOUT
Usage notes:

One second is the smallest interval for checking the timeout value. Therefore, the timeout event can take up to an additional second after the set timeout value.

If both the tcpipConnectTimeout and ConnectionTimeout values are set, the tcpipConnectTimeout keyword value should be less than the ConnectionTimeout keyword value.

The ConnectionTimeout keyword setting takes precedence over the tcpipConnectTimeout, MemberConnectTimeout, and MaxTransportWaittime keyword settings.

Before Version 9.7 Fix Pack 6, if the ConnectionTimeout keyword is set and automatic client reroute is enabled against the DB2 data sharing group or DB2® pureScale® instance, a connection is attempted only once to each of the Sysplex or DB2 pureScale member and once to group IP Address or cataloged node. The maximum connect wait time is approximately double the amount of time specified by the tcpipConnectTimeout keyword. If neither server can be reached within the amount of time specified by the keyword, the following error message is received:
SQL30081N  A communication error has been detected.  Communication 
   protocol being used: "TCP/IP". Communication API being used: 
   "SOCKETS".  Location where the error was detected: "<ip address>".
   Communication function detecting the error: "<failing function>".  
   Protocol specific error code(s): "<error code>", "*", "*". 
   SQLSTATE=08001

In Version 9.7 Fix Pack 6 and later fix packs, regardless of a high availability solution being enabled, the connect timeout value is enforced for a connection. If a connection attempt fails within the time specified by the ConnectionTimeout value, control is returned to the application with an SQL30081N error. The error and control is returned whether all alternative servers are tried or not.

The ConnectionTimeout keyword applies only to the TCPIP protocol and is not supported for connections to databases cataloged on a SOCKS-enabled TCP/IP node.

In DB2 Version 9.7 Fix Pack 6 and later fix packs, the ConnectionTimeout keyword is available for use with embedded SQL applications.