Configuration of Informix high-availability support for non-Java clients
To configure a non-Java client application that connects to an Informix high-availability cluster, you must connect to an address that represents a Connection Manager. You must also set the properties that enable workload balancing and the maximum number of connections.
Before you can enable the IBM® Data Server Driver for JDBC and SQLJ to connect to Informix database server for high availability, your installation must have one or more Connection Managers, a primary server, and one or more alternate servers.
The following table describes the basic settings, for non-Java applications.
| Connection address | Value |
|---|---|
| database host1 | The IP address of a Connection Manager. See Setting server and port properties for connecting to a Connection Manager. |
| database port1 | The SQL port number of a Connection Manager. See Setting server and port properties for connecting to a Connection Manager. |
| database name1 | The database name |
Notes:
|
|
To fine-tune the workload balancing function of Informix high-availability support, additional properties are available. The additional properties for non-Java applications are listed in the following table.
| Element in the db2dsdriver configuration file | Section in the db2dsdriver file | Description |
|---|---|---|
| enableWLB | <wlb> | Specifies whether workload balancing is enabled. Set this element to true to enable workload balancing. |
| maxTransportIdleTime | <wlb> | Specifies the maximum elapsed time before an idle transport is dropped. The default is 60. The minimum supported value is 0. |
| maxTransportWaitTime | <wlb> | Specifies the number of seconds that the client waits for a transport to become available. The default is 1. Specifying a value as -1 means unlimited wait time. The minimum supported value is 0. |
| maxTransports | <wlb> | Specifies the maximum number of connections that the requester can make to the high availability cluster. The default is -1 (unlimited). The minimum supported value is 1. |
| maxRefreshInterval | <wlb> | Specifies the maximum elapsed time in seconds before the server list is refreshed. The default is 10. The minimum supported value is 0. |
If you must use workload balancing but your applications cannot handle the errors that are returned for automatic client reroute processing, set the following parameters in the db2dsdriver.cfg configuration file.
| Element in the db2dsdriver configuration file | Section in the db2dsdriver file | Description | Value to set |
|---|---|---|---|
| enableWLB | <wlb> | Specifies whether workload balancing is enabled. | true. If the value of the enableAcr parameter is true, the connection manager retries the server connection. This parameter is supported by the Db2 for z/OS® Version 9.0 and later server. The Db2 Version 9.7 Fix Pack 3 and later is required to use enableAcr parameter with connections to Db2 for z/OS Version 10.0 and later server. If the enableAcr and enableWLB parameter values are false, the server connection fails. |
| enableAcr | <acr> | Specifies whether automatic client reroute is enabled. For CLI or .NET applications, enabling automatic client reroute automatically enables seamless failover. | false. |
| enableSeamlessAcr | <acr> | Specifies whether seamless failover is enabled. Seamless failover is supported for CLI, .NET, and embedded SQL applications. The default is true. | If the value of the enableAcr parameter is false, enableSeamlessAcr value is false, so you do not have to set it. |
Setting server and port properties for connecting to a Connection Manager
To set the server and port number in the db2dsdriver.cfg configuration file for connecting to a Connection Manager, follow this process:
- If your high-availability cluster is using a single Connection Manager, set the server name and port number to the server name and port number of the Connection Manager.
- If your high-availability cluster is using more than one Connection
Manager, follow this process:
- Specify the server name and port number of the main Connection Manager that you want to use.
- In the <acr> subsection in the database entry in the db2dsdriver.cfg configuration file, set the value of the enableAlternateServerListFirstConnect parameter to true.
- In the<alternateserverlist> parameter entries for the <acr> section of the db2dsdriver.cfg configuration file, set the server names and port numbers of alternative Connection Managers.