Specifies whether to run statically the
SQL statements that have been previously captured and stored by pureQuery
Runtime. The
captured SQL statements are stored either in a pureQueryXML file or
in a repository that is created in a database.
This property can take these values:
- STATIC
- When each SQL statement is prepared to be run, pureQuery determines
whether the statement matches a SQL statement that has been captured.
If it finds a matching statement, it runs that statement statically.
- If pureQuery does not find a matching SQL statement, or finds
a matching statement that is not bound, pureQuery's behavior depends
on the value of the allowDynamicSQL and capturedOnly properties.
See the description of the properties.
- DYNAMIC
- All SQL statements issued on the current Connection object are
run dynamically.
- DYNAMIC is the default value.
The following table shows the capturedOnly, executionMode and allowDynamicSQL combinations
and resulting operations:
Table 1. capturedOnly, executionMode, and allowDynamicSQL
combinations and resulting operations:capturedOnly |
executionMode |
allowDynamicSQL |
SQL statement matched |
Result |
TRUE |
STATIC |
TRUE |
YES |
isBindable = True, Run the SQL statement statically isBindable
= False, Run the SQL statement dynamically
|
TRUE |
STATIC/DYNAMIC |
TRUE/FALSE |
NO |
Return an error |
TRUE |
STATIC |
FALSE |
YES |
isBindable = True, Run the SQL statement statically isBindable
= False, Return an error
|
TRUE |
DYNAMIC |
TRUE/FALSE |
YES |
Run the SQL statement |
FALSE |
STATIC |
TRUE |
YES |
isBindable = True, Run the SQL statement statically. isBindable
= False, Run the SQL statement dynamically
|
FALSE |
STATIC |
TRUE |
NO |
Run the SQL statement dynamically |
FALSE |
STATIC |
FALSE |
YES |
isBindable = True, Run the SQL statement statically. isBindable
= False, Return an error
|
FALSE |
STATIC |
FALSE |
NO |
Return an error |
FALSE |
DYNAMIC |
TRUE/FALSE |
YES/NO |
Run the SQL statement |
DB2 CLI and IBM Data Server Driver usage notes
When using DB2® Call Level Interface (CLI) or
the IBM® Data Server Driver with
pureQuery Runtime, you can use the pureQuery Runtime property as a
configuration keyword.
- IBM CLI keyword syntax
- executionMode = STATIC | DYNAMIC
- IBM Data Server Driver configuration syntax
- <parameter name="executionMode" value="STATIC | DYNAMIC" />
- Equivalent IBM Data Server
Provider for .NET connection string keyword
- executionMode=STATIC | DYNAMIC
Usage notes
CLI or .NET applications that
are enabled with pureQuery client optimization support the following
keywords to specify the location of the pureQueryXML file that contains
the captured SQL statements:
- pureQueryXml specifies the location of the file.
- pureQueryXmlRepository and propertiesGroupId,
specifies the location of a repository in a database that contains
the file data.
To ensure that Java
applications with named parameter markers work correctly, regardless
of the data server type and version, before you use named parameter
markers in your applications, set the Connection or DataSource property enableNamedParameterMarkers to DB2BaseDataSource.YES.