The workbench provides features for capturing and binding
SQL statements in a non-pureQuery API application, and for executing
those statements statically when you run that application.
Before you begin
Ensure that your system meets
the hardware and software requirements. See System requirements for InfoSphere® Optim™ pureQuery
Runtime.
The
application must be located in a Java project
in the workbench.
Before performing a bind operation, ensure
that the following prerequisites are met.
- The privilege set of the user that invokes the pureQuery StaticBinder
utility must include one of the following authorities:
- SYSADM authority
- DBADM authority
- If the package does not exist, the BINDADD privilege, and one
of the following privileges:
- CREATEIN privilege
- DB2® for z/OS®: PACKADM authority on the collection
or on all collections
- DB2 Database for Linux, UNIX, and Windows: IMPLICIT_SCHEMA
authority on the database if the schema name of the package does not
exist
- DB2 for z/OS: If the package exists, the BIND privilege
on the package
- DB2 Database for Linux, UNIX, and Windows: If
the package exists:
- ALTERIN privilege on the schema
- BIND privilege on the package
- DB2 for Linux, UNIX,
and Windows: The user
also needs all privileges that are required to compile any static
SQL statements in the application. Privileges that are granted to
groups are not used for authorization checking of static statements.
If the user has SYSADM authority, but no explicit privileges to complete
the bind, the DB2 database manager
grants explicit DBADM authority automatically.
You
can use a SQL Management repository created in a database for the
following activities when using pureQuery Runtime for the static execution
in non-pureQuery API applications:
- Store SQL statements and related information captured by pureQuery
client optimization.
- Store and manage pureQuery runtime configuration information and
pureQueryXML file information.
- Retrieve the pureQuery information for use by an application enabled
for pureQuery client optimization.
To configure the static execution of SQL statements in
non-pureQuery API applications, these are the basic steps:
What to do next
You can use the SQL Outline view to help you troubleshoot
any problems that you might have with your SQL statements. Remember
that if you modify any of your SQL statements or any other aspect
of your application, you must recapture the SQL and re-create your DB2 packages.
If you plan to deploy your
application in a JAR file: Before you deploy your application
in a JAR file, you must ensure that the Default.bindProps file contains
an entry for every pureQueryXML file that the contains SQL statements
that you want to bind. The pureQuery StaticBinder utility, which you
must run from a command line on the database where you deploy your
application, acts upon only the pureQueryXML files that are listed
in the Default.bindProps file.
To
add the files:
- In the folder dataAccessFolder in your project, Right-click the
Default.bindProps file and select Data Access Development > Add
or Remove Entries.
- In the Add or Remove Entries window, add
all of the required pureQueryXML files.
If you think that you might need to revise
the root package names, collection IDs, and versions for your DB2 packages after you deploy the
application, you must also ensure that your Default.genProps file
contains an entry for every pureQueryXML file that the defaultOptions line
applies to. You can also add entries to this file by right-clicking
it and using the Add or Remove Entries window.