Format of database URLs
The format of a database URL is determined by whether you are connecting from a client or on the database server.
For connections from a client, use the following format:
For
connections on the database server, use the following format:
- hostname
- This required parameter specifies the host name of the computer that is running the HCL OneDB™ database server.
- portnum
- This required parameter specifies the port number of the HCL OneDB database server. The value of the port number and server name is listed in the /etc/services file.
- database_name
- This required parameter specifies the name of the HCL OneDB database to connect to. If you do not specify the name of a database, a connection is made to the HCL OneDB database server.
- INFORMIXSERVER=servername
- This optional parameter specifies the name of the database server to connect to. For example,
INFORMIXSERVER=lo_informix1210
. - USER=userid
- This optional parameter specifies the user ID that is used in connections to the HCL OneDB database server.
- PASSWORD=password
- This optional parameter specifies the password for the specified user ID.
- SSO=database_server@realm
- This required parameter specifies the service principle for (SSO) access control. For more information, see ids_jdbc_069.html#ids_jdbc_069.
- name=value
- This optional parameter specifies the name-value pair that specifies a value for the HCL OneDB environment variable that is contained in the name variable, which is recognized by either HCL OneDB JDBC Driver or by HCL OneDB database servers. The name variable is not case-sensitive.
If an LDAP server or sqlhosts file provides the IP address, host name, or port number through the SQLH_TYPE property, you do not have to specify them in the database URL. For more information, see Dynamically reading the sqlhosts file.
In the following example, the connection syntax for a
client-side connection is shown:
jdbc:informix-sqli://123.45.67.89:1533/testDB:
INFORMIXSERVER=myserver;user=rdtest;password=test
In
the following example, the connection syntax for a database server
connection is shown:
jdbc:informix-direct://testDB;user=rdtest;password=test