Question & Answer
You have ensured your application is freeing all unused statment handles. How can you increase the number of statement handles for your application?
The CLIPKG CLI/ODBC configuration keyword specifies the number of large packages to be generated. This keyword is used to increase the number of sections for SQL statements in CLI/ODBC applications.
To increase the number of statement handles available to your application a rebind of the CLI packages from the client with a higher CLIPKG value will need to be performed.
- cd <home_directory>/sqllib/bnd
- db2 connect to <database_name>
- db2 "BIND @db2cli.lst BLOCKING ALL CLIPKG 6 grant public"
- db2 terminate
- cd <home_directory>/sqllib/cfg
- Edit the db2cli.ini file adding the following line under your dbalias section:
Note: CLIPKG 6 may not be high enough.
When changing the CLIPKG value caution should be taken. The higher this value is the more system resources can be used, and performance may take a hit as more open statement handles are in use. It is very possible to hit hardware and operating system limitations when setting this at high values.
16 June 2018