RE: Informix-list Digest, Vol 191, Issue 3
Posted in 2009
Topics: High Availability & Replication, Connectivity: ODBC / JDBC / .NET, Security, Permissions & Auditing, Networking & sqlhosts Configuration, Platform-Specific Issues, Java & JDBC Development
Hi, I have a query regarding client Java application connectivity in HDR Environment. I am using Informix 11.5 with Red Hat Linux 4 update 6 After a long search for information we found that the best way for application connectivity is using the SQLHOSTS file as the connection string and that this way the connection is made automatically to the Primary DB Server in the HDR Pair. However, I am unable to connect to the Primary DB using this string. I have the following questions. 1. Is this methodology the standard approach for connection to DB via Java Application? 2. The string suggested in all the document is as below: jdbc:informix-sqli:INFORMIXSERVER=grp_emcom;user=informix;password=Informix; SQLH_TYPE=FILE;SQLH_FILE=/Informix/sqlhosts 3. I unable to identify, what will be the correct path of the SQLH_FILE parameter in the string. I have tried, INFORMIXSQLHOSTS, INFORMIXDIR ENV variables as well as absolute path of these variables. 4. I am also unable to determine whether this path in question will be of the Primary DB Server in the HDR Pair or this path has to be mentioned somewhere in the application server. Please guide, as I am unable to work further !! Regards, Krishnan
On Oct 7, 12:40 pm, "Krishnan Rangachari" <krishnan.rangach...@esteltelecom.com> wrote: > Hi, > > I have a query regarding client Java application connectivity in HDR > Environment. I am using Informix 11.5 with Red Hat Linux 4 update 6 > > After a long search for information we found that the best way for > application connectivity is using the SQLHOSTS file as the connection string > and that this way the connection is made automatically to the Primary DB > Server in the HDR Pair. However, I am unable to connect to the Primary DB > using this string. I have the following questions. > > 1. Is this methodology the standard approach for connection to DB via Java > Application? > 2. The string suggested in all the document is as below: > > jdbc:informix-sqli:INFORMIXSERVER=grp_emcom;user=informix;password=Informix; > SQLH_TYPE=FILE;SQLH_FILE=/Informix/sqlhosts > 3. I unable to identify, what will be the correct path of the SQLH_FILE > parameter in the string. I have tried, INFORMIXSQLHOSTS, INFORMIXDIR ENV > variables as well as absolute path of these variables. > 4. I am also unable to determine whether this path in question will be of > the Primary DB Server in the HDR Pair or this path has to be mentioned > somewhere in the application server. > > Please guide, as I am unable to work further !! > > Regards, > Krishnan You need to configure the two nodes of the HDR pair in a single group to take advantage of the sqlhost file. It would look something like ... hdrpair group - - hdrprim ontcpsoc <primary_server_ip> <primary_server_port_number> g=hdrpair hdrsec ontcpsoc <secondary_server_ip> <secondary_server_port_number> g=hdrpair and then in your connection string, you would connect using 'hdrpair'