You can use a repository to store the pureQueryXML and
configuration information that pureQuery client optimization uses
to control the SQL statements issued by an application.
Before you begin
The application and repository must be available:
About this task
The following steps describe the general steps for using
a repository for pureQuery client optimization.
The steps start
with an application that is enabled with pureQuery client optimization,
using a pureQuery runtime configuration file and a pureQueryXML file
containing SQL statements used by pureQuery client optimization.
Procedure
To update an application enabled with pureQuery client
optimization to use a repository:
- Create a repository and a runtime group version to hold
the pureQuery information for the application. Use the
ManageRepository utility to create a repository in a database. Use
the ManageRepository utility or the workbench to create and manage
a runtime group version.
- Retrieve the file that contains the pureQuery runtime configuration
properties and the pureQueryXML file.
- Modify the properties in the file:
- Remove the pureQueryXml property. The finalRepositoryProperties and propertiesGroupId properties
that you specify later specify the location of the pureQueryXML file.
- Add the propertiesRefreshInterval property. When
the propertiesRefreshInterval property is specified,
the application checks the repository for changes to the pureQuery
runtime properties and pureQueryXML file information in the repository.
If changes are detected, the updated information is extracted and
used.
- Optional: Retrieve other information, such
as the bind options, and the configure options used with the pureQueryXML
file. The options can be stored in the repository.
- Upload the pureQuery runtime configuration properties and
pureQueryXML file to the repository.
- Specify the following pureQuery runtime properties that
the application uses at startup:
- The finalRepositoryProperties property specifies
the database containing the repository.
- The propertiesGroupId property specifies the
runtime group ID that contains the pureQuery runtime properties and
pureQueryXML file information used by the application.
- The propertiesRefreshInterval property specifies
the interval between checks for updates to the pureQuery properties
and pureQueryXML data. If updates are found, the application retrieves
and uses the updated information.
- Activate the runtime group version in the repository.
- Restart the application.
Results
The application uses the pureQuery runtime configuration
and pureQueryXML file information from the repository.
If the
application is configured to capture SQL data and outputPureQueryXml property
is not specified as a property in the repository, the SQL data captured
after the application restart is stored in the runtime group of the
repository. If the property is specified, the application continues
to store the captured SQL data on the file system.
What to do next
You can update pureQuery runtime properties and pureQueryXML
data for the application without restarting the application. Based
on the interval specified by the
propertiesRefreshInterval property,
the application checks for changes to the pureQuery configuration
and pureQueryXML information in the repository. The application retrieves
and uses the updated information. The following are examples of updates
you can make:
- You can change the location of the captured SQL data. For example,
if the outputPureQueryXml is of the properties stored
in the repository, you can remove the property. After the application
starts using the updated properties, the captured SQL data is stored
in the repository.
- You can manage the pureQueryXML file. You extract the pureQueryXML
data merge captured SQL data with the pureQueryXML file and configure
the pureQueryXML file. The captured SQL data can be extracted from
a repository or from a file system. For databases that supports static
SQL, you can create packages from the SQL statements in the pureQueryXML
data, and bind the packages to the database.