Thank you for the reply.
Currently the servers are all up, so I can't recreate that exact scenario now but some of the DB instances are down. So, when I try to connect to those DB instance with the code snippet you provided, it waits for that much time period and exits with this error message
Exception: [IBM][CLI Driver] 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: "selectForConnectTimeout". Protocol specific error code(s): "0", "*", "*". SQLSTATE=08001
SQLCODE=-30081
I think this solution is working as I can see "selectForConnectTimeout" in the error logs. :)
I have one doubt in the code snippet, as to the difference between
"querytimeout=1" and "connecttimeout=10"
Does connection timeout denotes the time the ibm_db module waits to establish a connection with the server ? If so, what will querytimeout accomplish ?
Thanks and Regards,
Ron