Dynamically reading the HCL OneDB sqlhosts file

HCL OneDB™ JDBC Driver supports the JNDI (Java™ naming and directory interface). This support enables JDBC programs to access the HCL OneDB sqlhosts file. The sqlhosts file lets a client application find and connect to the HCL OneDB database server anywhere on the network. For more information about this file, see the HCL OneDB Administrator's Guide for your database server.

You can access sqlhosts data from a local file or from an LDAP server. The system administrator must load the sqlhosts data into the LDAP server using the HCL OneDB utility.

Your CLASSPATH variable must reference the JNDI JAR (Java archive) files and the LDAP SPI (service provider interface) JAR files. You must use LDAP Version 3.0 or later, which supports the object class extensibleObject.

You can use the sqlhosts file group option to specify the name of a database server group for the value of ONEDB_SERVER. The group option is useful with High-Availability Data Replication (HDR); list the primary and secondary database servers in the HDR pair sequentially. For more information on about how to set or use groups in sqlhosts file, see the HCL OneDB Administrator's Guide. For more information about HDR, see Connections to the servers of a high-availability cluster.