Configuration of Db2 workload balancing support for non-Java clients
For connections to Db2 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.
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:
|
The following configuration keyword in the db2dsdriver.cfg file can be used to change the connection-level workload balancing setting.
Element in the db2dsdriver.cfg configuration file | Section | Value |
---|---|---|
connectionLevelLoadBalancing parameter | <database> | Specifies whether connection-level load balancing is in effect. It 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.
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 unless the server accessed is a Db2 for z/OS® server; in that case, the default is false. |
enableSeamlessFailoverErrorCodes keyword | <acr> | Specifies whether the CLI Driver maps non-seamless errors, such as SQL30108N, SQL20542N, to the communication error SQL30081N. If the property value is set to false and any non-seamless error happens during the execution, then the driver sends a SQL30081N communication error to the application. This new behavior is seen when the enableWLB property is set to true and the servers are Db2 or Db2 for z/OS. If the enableSeamlessFailoverErrorCodes property is set to true, the application receives seamless error codes (SQL30108N, SQL20542N) in case of non-seamless failover. The default value of enableSeamlessFailoverErrorCodes is false for Db2 for z/OS and true for Db2. |
enableWLB parameter | <wlb> | Specifies whether transaction-level workload balancing is in effect. It 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. Specifying a value as -1 means unlimited wait time. The minimum supported value is 0. |
maxTransports | <wlb> | Specifies the maximum number of physical connections can be made for each application process that connects to the Db2 pureScale instance.The default is -1 which means establish as many as needed. |
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. |
For CLI, OLE DB, ADO.NET, and embedded SQL applications,
there are three connection timeout keywords, which you can set in
the IBM data server driver configuration file (db2dsdriver.cfg):
- tcipipConnectionTimeout
- The tcipipConnectionTimeout keyword specifies the number of seconds before an attempt to open a socket fails
- ConnectionTimeout
- The ConnectionTimeout keyword specifies the number of seconds that a client application waits for a connection to be established.
- MemberConnectTimeout
- The MemberConnectTimeout keyword specifies the number of seconds that a client application waits before being routed to the next IP address in the server list.