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
- Go to sqllib/cfg folder and open db2dsdriver.cfgsample
file.
- Set the DSN name, database name and other parameters.
- 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>
- 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;