Current Status

Actively playing with all possible backend services

06 December, 2012

Informix database - INFORMIXCONRETRY and INFORMIXCONTIME



com.informix.jdbc.IfxSqliConnect.(IfxSqliConnect.java)

I got above error when making below connection in java file :

Class.forName("com.informix.jdbc.IfxDriver");
        Connection conn = DriverManager.getConnection("jdbc:informix-sqli://192.168.1.1:1000/databasename:INFORMIXSERVER=server_name;user=gayan;password=password;");


So I chaneged the connection as follows:

Class.forName("com.informix.jdbc.IfxDriver");
        Connection conn = DriverManager.getConnection("jdbc:informix-sqli://192.168.1.1:1000/databasename:INFORMIXSERVER=server_name;user=gayan;password=password;INFORMIXCONTIME=60;INFORMIXCONRETRY=3");


What does it realy mean?

If INFORMIXCONTIME is set to 60 and INFORMIXCONRETRY is set to 3, attempts to connect to the database server (after the initial attempt at 0 seconds) are made at 20, 40, and 60 seconds, if necessary, before aborting. This 20-second interval is the result of INFORMIXCONTIME divided by INFORMIXCONRETRY. If you attempt to set INFORMIXCONTIME to zero, the database server automatically resets it to the default value of 60 seconds.
       

INFORMIXCONRETRY Specifies the maximum number of additional connection attempts that can be
made to each database server by the client during the time limit specified by
the default value of INFORMIXCONTIME


INFORMIXCONTIME Sets the timeout period for an attempt to connect to the database server. If a
connection attempt does not succeed in this time, the attempt is aborted and a
connection error is reported.

No comments:

Some Popular Posts