captureMode property

Specifies whether to capture information about SQL statements.

This information is written to the file that is specified by the pureQueryXml property or the location specified by the outputPureQueryXml property. If the location is a repository that was created in a database, the information is written to the repository runtime group specified by the propertiesGroupId property.

When you run your application with captureMode set to ON, you must run successfully all logic paths that contain the SQL statements that you want to capture. pureQuery captures SQL statements only when they are run successfully.

This property can take these values:

ON
Specifies to capture SQL statements when the application runs.
OFF
Specifies not to capture SQL statements when the application runs. This is the default value.

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
captureMode = ON | OFF
IBM Data Server Driver configuration syntax
<parameter name="captureMode" value="ON | OFF" />
Equivalent IBM Data Server Provider for .NET connection string keyword
N/A

Usage notes

CLI applications that are enabled with pureQuery client optimization support only the pureQueryXml keyword to capture data in a file.

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.


Feedback