DB2 Version 9.7 for Linux, UNIX, and Windows

Configuration of DB2 for Linux, UNIX, and Windows workload balancing support for non-Java clients

For connections to DB2® for Linux, UNIX, and Windows data servers in a DB2 pureScale® instance, connection-level workload balancing is enabled at a non-Java client by default. Transaction-level workload balancing capability must be enabled explicitly.

The following table describes the basic settings to enable connection-level workload balancing support for non-Java™ applications.

Table 1. Basic settings to enable DB2 for Linux, UNIX, and Windows connection-level workload balancing support in non-Java applications
Client setting Value
Connection address:
database host1 The IP address of a member of a DB2 pureScale instance.2
database port1 The SQL port number of a member of a DB2 pureScale instance2
database name1 The database name
Note:
  1. Depending on the client that you use, connection information is defined in one of several possible sources:
    • If you are using one of the data server drivers or a CLI or open source application that uses IBM® Data Server Client or IBM Data Server Runtime Client:
      • If host, port, and database information is provided in a connection string in an application, the DB2 driver uses that information.
      • If host, port, and database information is not provided in the connection string in an application, the driver uses the information provided in the db2cli.ini file.
      • If host, port, and database information is not provided in the connection string in the application or the db2cli.ini file, the DB2 driver uses the information in the db2dsdriver.cfg configuration file.
    • If you are using a .NET application or an application that uses embedded SQL with the IBM Data Server Client or the IBM Data Server Runtime Client, connection information can be obtained from the database catalog, connection string, db2dsdriver.cfg configuration file, or .NET object properties.
  2. Alternatively, you can use a distributor, such as Websphere Application Server Network Deployment, or multihomed DNS to establish the initial connection to the database.
    • For a distributor, you specify the IP address and port number of the distributor. The distributor analyzes the current workload distribution, and uses that information to forward the connection request to one of the members of the DB2 pureScale instance.
    • For multihomed DNS, you specify an IP address and port number that can resolve to the IP address and port number of any member of the DB2 pureScale instance. Multihomed DNS processing selects a member based on criterion, such as simple round-robin selection or member workload distribution.

You can use the following configuration keyword in the db2dsdriver.cfg file to change the connection-level workload balance setting.

Table 2. Setting to control connection-level workload balancing behavior
Element in the db2dsdriver.cfg configuration file Section Value
connectionLevelLoadBalancing parameter <database> Specifies whether connection-level load balancing is in effect. The value is true by default.

You can use the following configuration keywords in the db2dsdriver.cfg file to enable and fine-tune transaction-level workload balancing.

Table 3. Settings to control transaction-level workload balancing behavior
Element in the db2dsdriver.cfg configuration file Section Value
connectionLevelLoadBalancing parameter <database> Must be set to true if you want to use transaction-level workload balancing. The setting is true by default.
enableWLB parameter <wlb> Specifies whether transaction-level workload balancing is in effect. The value is false by default.
maxTransportIdleTime <wlb> Specifies the maximum elapsed time in number of seconds before an idle transport is dropped. The default is 60 . The minimum value is 0.
maxTransportWaitTime <wlb> Specifies the number of seconds that the client waits for a transport to become available. The default is 1 . The minimum supported value is 0, and -1 specifies unlimited time.
maxTransports <wlb> Specifies the maximum number of physical connections that can be made for each application process that connects to the DB2 pureScale instance. The default is -1 (unlimited) .
maxRefreshInterval <wlb> Specifies the maximum elapsed time in number of seconds before the server list is refreshed. The default is 10. The minimum supported value is 0.