With these settings, pureQuery runs SQL statements statically
or dynamically, depending on certain conditions. pureQuery can also
run alternative SQL statements that might be in a pureQueryXML file.
When you run your application with these settings,
pureQuery checks
whether a given SQL statement is already in the pureQueryXML file
for the connection that the statement must run against. Then,
pureQuery performs
one of these actions:
- If the statement is in the pureQueryXML file and the statement
is bound in a DB2® package, pureQuery runs
the statement statically.
- If the statement is in the pureQueryXML file but the statement
is not bound, does not use autogenerated keys, and has a corresponding <processedSql>
element that contains a replacement SQL statement, pureQuery runs
the replacement SQL statement dynamically.
- If the statement is in the pureQueryXML file but the statement
is not bound and does not have a corresponding <processedSql> element
that contains a replacement SQL statement, pureQuery runs
the SQL statement dynamically.
- If the statement is not in the pureQueryXML file, pureQuery throws
an exception.
Table 1. Required settingsProperty |
Setting |
executionMode |
STATIC |
capturedOnly |
TRUE |
enableDynamicSQLReplacement |
TRUE |
pureQueryXml |
file-name.pdqxml or file-name.xml |
This table does not show properties that you can leave
at their default values or other properties that you might want to
use. Here is a complete list of the properties that you can use when
running SQL statements:
You can also set logging properties. See Descriptions of properties for logging and tracing.
See How to set properties for client optimization for information about how and
where to set these properties.