Example of running the StaticBinder utility for client optimization

This example demonstrates methods for running the StatiBinder utility on two pureQueryXML files.

Suppose that you have two pureQueryXML files, one for each connection that your non-pureQuery API application makes. The names of the files are capture_sales.pdqxml and capture_employee.pdqxml.

These are the same pureQueryXML files that were used in the example in the topic Configure utility.

You want to create DB2® packages with the SQL statements in these pureQueryXML files and pass the following values to the StaticBinder utility.

Table 1. Example values for the StaticBinder utility
Option capture_sales.pdqxml capture_employee.pdqxml
-url jdbc:db2://sys01:500/DB2M jdbc:db2://sys01:501/DB2Q
-username user01 user02
-password nQ6wCJkz DpJR8fk2
-bindOptions QUALIFIER myQual QUALIFIER myQual
In this situation, there are two methods that you can use to run the StaticBinder utility to bind DB2 packages.
  • Run the StaticBinder utility twice and supply a different .pdqxml file each time:
    java com.ibm.pdq.tools.StaticBinder -url jdbc:db2://sys01:500/DB2M -username user01 \
     -password nQ6wCJkz -bindOptions "QUALIFIER myQual" -pureQueryXml
    C:\capture_files\capture_sales.pdqxml
    java com.ibm.pdq.tools.StaticBinder -url jdbc:db2://sys01:501/DB2Q -username user02 \
     -password DpJR8fk2 -bindOptions "QUALIFIER myQual" -pureQueryXml
    C:\capture_files\capture_employee.pdqxml
  • Run the StaticBinder utility once and supply an options file in which the .pdqxml files are listed.

    The command might look like this:

    java com.ibm.pdq.tools.StaticBinder -optionsFile myOptionsFile.txt

    The options file, which can have any name and extension that your operating system supports, might look like this:

    defaultOptions = -bindOptions "QUALIFIER myQual"
    
    C:\capture_files\capture_sales.pdqxml = -url jdbc:db2://sys01:500/DB2M -username user01 -password nQ6wCJkz
    
    C:\capture_files\capture_employee.pdqxml = -url jdbc:db2://sys01:501/DB2Q -username user02 -password DpJR8fk2

You can generate DBRM files by substituting the DBRM options for the bindOptions option.

In the example for the Configure utility, that utility updated the .pdqxml files with the following values:

Table 2. Example values for the Configure utility
Options for the Configure utility capture_sales.pdqxml capture_employee.pdqxml
-collection first second
-markDDLForBind FALSE FALSE
-pkgVersion 1.0 1.0
-rootPkgName PK001S PK005E
-sqlLimit 200 200

That example specified that capture_sales.pdqxml contains 450 SQL DML statements and capture_employee.pdqxml contains 400 SQL DML statements and 50 SQL DDL statements.

The StaticBinder utility creates the following packages and binds them on their respective subsystems.
Attention: This example assumes that, when you ran the Configure utility, you set the option markDDLForBind to FALSE.
Packages for capture_sales.pdqxml
  • PK001SA1
  • PK001SA2
  • PK001SA3
  • PK001SA4
  • PK001SB1
  • PK001SB2
  • PK001SB3
  • PK001SB4
  • PK001SC1
  • PK001SC2
  • PK001SC3
  • PK001SC4
Packages for capture_employee.pdqxml
  • PK005EA1
  • PK005EA2
  • PK005EA3
  • PK005EA4
  • PK005EB1
  • PK005EB2
  • PK005EB3
  • PK005EB4

The letters in the suffix (A,B,C) indicate where the value of sqlLimit caused the StaticBinder to create another DB2 package for a pureQueryXML file. The numbers in the suffix (1, 2, 3, 4) indicate the isolation level for the DB2 package.


Feedback