Configuring work load balancing for Db2 zOS data source

Work load balancing (WLB) can improve the performance of query or IUD operations to the Db2 z/OS data sharing group.

About this task

You can add the parameter enableWLB in db2dsdriver.cfg to use the federation WLB support. WLB can only be enabled for a federation fenced wrapper. Enabling this feature on an unfenced wrapper will cause an SQL1224N error. A fenced wrapper means the wrapper is executed separately from Db2sysc process, more specifically it is executed in db2fmp process.

Procedure

  1. Go to sqllib/cfg folder and open db2dsdriver.cfgsample file.
  2. Set the DSN name, database name and other parameters.
  3. Set the parameter enableWLB to true, to enable federation WLB support. For example:
    <configuration>
      <dsncollection>
          <dsn alias="LOCDB11" name="LOCDB11" host="9.125.72.122" port="480">
          </dsn>
      </dsncollection>
      <databases>
        <database name="LOCDB11" host="9.125.72.122" port="480">
          <wlb>
            <parameter name="enableWLB" value="true"/>
          </wlb>
          <acr>
            <parameter name="enableAcr" value="false"/>
          </acr>
        </database>
      </databases>
    </configuration>
  4. Create a fenced wrapper, server, user mapping and nickname. For example:
    create wrapper wrapper1 library 'libdb2drda.so' options(db2_fenced 'Y');
    create server server1 type db2/zos version 12.1 wrapper wrapper1 authorization "j15usr4" password "passw0rd" options (dbname ' LOCDB11');
    create user mapping for user server server1 options ( remote_authid 'j15usr4', remote_password 'passw0rd' );
    create nickname nk1 for server1.j15usr4.alltype_test;
    select * from nk1;
    Note: If the data source is Db2 z/OS V12R1M500 or less than V12R1M500, you must remove the parameter clientApplCompat. For more information, see V12R1Mnnn application compatibility levels for data server clients and drivers