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.

Table 1. Basic settings to enable Informix high availability support in 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:
  1. Depending on the Db2® product and driver you use, connection information can be defined in one of several possible sources.
    • In scenario that involves CLI or open source application with IBM data server client, connection information can be obtained from following sources:
      • If host, port, and database information is provided in a connection string of an application, CLI driver uses that information to establish a connection.
      • Information from the database catalog.
      • If host and port information is not provided in the connection string of an application or database catalog, the driver searches for required information in the db2cli.ini file, and this information provided in the db2cli.ini file is used by CLI driver to establish a connection.
      • If host and port information is not provided in the connection string of an application, database catalog or the db2cli.ini file, CLI driver uses information in the db2dsdriver.cfg configuration file.
    • In scenario that involves CLI or open source application with IBM data server driver, connection information can be obtained from following sources:
      • If host, port, and database information is provided in a connection string of an application, CLI driver uses that information to establish a connection.
      • If host and port information is not provided in the connection string of an application, the driver searches for required information in the db2cli.ini file, and this information provided in the db2cli.ini file is used by CLI driver to establish a connection.
      • If host and port information is not provided in the connection string of the application or the db2cli.ini file, CLI driver uses information in the db2dsdriver.cfg configuration file.
    • In scenario that involves .NET application with IBM data server client, connection information can be obtained from following sources:
      • If host, port, and database information is provided in a connection string of an application, .NET data provider uses that information to establish a connection.
      • If host, port and database information provided through .NET object properties, .NET data provider uses that information to establish a connection.
      • Information from the database catalog.
      • If host and port information is not provided in the connection string of an application or the database catalog, .NET data provider uses information in the db2dsdriver.cfg configuration file.
    • In scenario that involves .NET application with IBM data server driver, connection information can be obtained from following sources:
      • If host, port, and database information is provided in a connection string of an application, .NET data provider uses that information to establish a connection.
      • If host, port and database information provided through .NET object properties, .NET data provider uses that information to establish a connection.
      • If host and port information is not provided in the connection string of an application or the database catalog, .NET data provider uses information in the db2dsdriver.cfg configuration file.

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.

Table 2. Properties for fine-tuning workload balancing support for connections from non-Java applications to Informix database server
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.

Table 3. Properties for enabling only Sysplex workload balancing for connections from non-Java applications to Informix database server
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:
    1. Specify the server name and port number of the main Connection Manager that you want to use.
    2. In the <acr> subsection in the database entry in the db2dsdriver.cfg configuration file, set the value of the enableAlternateServerListFirstConnect parameter to true.
    3. 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.