Connection property syntax

You can let HCL OneDB™ JDBC Driver look up the host name or port number in an LDAP server instead of specifying them in a database URL or DataSource object directly. You must specify the following properties in the database URL or DataSource object for the LDAP server:
  • SQLH_TYPE=LDAP
  • LDAP_URL=ldap://host-name:port-number

    host-name and port-number are those of the LDAP server, not the database server.

  • LDAP_IFXBASE=Informix-base-DN
  • LDAP_USER=user
  • LDAP_PASSWD=password

If LDAP_USER and LDAP_PASSWD are not specified, HCL OneDB JDBC Driver uses an anonymous search to search the LDAP server. The LDAP administrator must make sure that an anonymous search is allowed on the sqlhosts entry. For more information, see your LDAP server documentation.

Informix-base-DN has the following basic format:
cn=common-name,o=organization,c=country
If common-name, organization, or country consists of more than one word, you can use one entry for each word. For example:
cn=informix,cn=software
Here is an example database URL:
jdbc:informix-sqli:informixserver=value;SQLH_TYPE=LDAP; 
   LDAP_URL=ldap://davinci:329;LDAP_IFXBASE=cn=informix,
   cn=software,o=kmart,c=US;LDAP_USER=abcd;LDAP_PASSWD=secret
You can also specify the sqlhosts file in the database URL or DataSource object. The host name and port number or the service name of the HCL OneDB database server as specified in the /etc/services file are read from the sqlhosts file. You must specify the following properties for the file:
  • SQLH_TYPE=FILE
  • SQLH_FILE=sqlhosts-filename
The sqlhosts file can be local or remote, so you can refer to it in the local file system format or URL format. Here are some examples:
  • SQLH_FILE=http://host-name:port-number/sqlhosts.iusSQLH_FILE=http://host-name:service-name/sqlhosts.ius

    The host-name and port-number or service-name of the HCL OneDB database server (from the etc/services file) elements are those of the server on which the sqlhosts file resides.

  • SQLH_FILE=file://D:/local/myown/sqlhosts.ius
  • SQLH_FILE=/u/local/sqlhosts.ius
Here is an example database URL:
jdbc:informix-sqli:informixserver=value;SQLH_TYPE=FILE; 
   SQLH_FILE=/u/local/sqlhosts.ius

If the database URL or DataSource object references the LDAP server or sqlhosts file but also directly specifies the IP address, host name, and port number, then the IP address, host name, and port number specified in the database URL or DataSource object take precedence. For information about how to set these connection properties by using a DataSource object, see DataSource extensions.