The ManageRepository utility can create a repository in a supported database. You can also use ManageRepository or the workbench to manage a repository.
java com.ibm.pdq.tools.ManageRepository
-create repository
-repositoryType pureQueryOnly
-repositoryURL jdbc:db2://test.user.com:17593/SAMPLE
-repositoryUsername testid
-repositoryPassword testpwd
-repositoryDriverClass com.ibm.db2.jcc.DB2Driver
The following example generates a DDL script that can be used to create a repository. The repository is not created.
java com.ibm.pdq.tools.ManageRepository
-create repository
-repositoryType pureQueryOnly
<connection options>
-generateScriptOnly "c:\create.ddl"
Create a repository to store only pureQuery runtime data
java com.ibm.pdq.tools.ManageRepository
-create repository
-repositoryType pureQueryRuntimeOnly
<connection options>
Create packages to access the repository
After the repository is created, for database platforms that support static SQL, database packages can be created to govern access to the repository.
java com.ibm.pdq.tools.ManageRepository
-bind packages
<connection options>
If the user specifies the -generateScriptOnly option,
the ManageRepository utility only create the command script necessary
to bind the SQL statement that manage the repository. The bind is
not performed.Update pureQueryXML data with captured SQL data
java com.ibm.pdq.tools.ManageRepository
-extract runtimeGroup
-outputDirectory "c:\mergeDir"
-pureQueryXml "capture.pdqxml"
-optionsFileForBind "bind.properties"
-optionsFileForConfigure "gen.properties"
-pureQueryProperties "pdq.properties"
-incrementalCapture "testcap"
-runtimeGroupId "SampleId"
-runtimeGroupVersion "3.1"
<connection options>
The following command removes the captured SQL data from the runtime group version after comparing the captured SQL with the captured SQL data in the files to ensure that the captured SQL in the repository has not changed.
java com.ibm.pdq.tools.ManageRepository
-delete incremental
-inputDirectory "c:\mergeDir"
-runtimeGroupId "SampleId"
-runtimeGroupVersion "3.1"
-incrementalCapture "testcap"
<connection options>
java com.ibm.pdq.tools.ManageRepository
-update runtimeGroup
-inputDirectory "c:\mergeDir"
-pureQueryXML "capture.pdqxml"
-bindProps "bind.properties"
-genProps "gen.properties"
-pdqProperties "pdq.properties"
-runtimeGroupId "SampleId"
-version "3.2"
<connection options>
Activating a runtime group version
java com.ibm.pdq.tools.ManageRepository
-activate runtimeGroup
-runtimeGroupId "SampleId"
-runtimeGroupVersion "3.2"
<connection options>
Specifying a connection to a separate repository containing captured SQL data
The captured SQL data from an application using pureQuery client optimization can be stored in a different repository than the pureQueryXML data. You can specify both repositories and extract the captured SQL data when you extract the pureQueryXML data.
java com.ibm.pdq.tools.ManageRepository
-extract runtimeGroup
-outputDirectory "c:\mergeDir"
-pureQueryXML "capture.pdqxml"
-bindProps "bind.properties"
-genProps "gen.properties"
-pdqProperties "pdq.properties"
-incrementalCapture "testcap"
-runtimeGroupId "SampleId"
-version "3.1"
-repositoryURL jdbc:db2://test.user.com:17593/SAMPLE
-repositoryUsername testid
-repositoryPassword testpwd
-repositoryDriverClass com.ibm.db2.jcc.DB2Driver
-incrementalRepositoryURL=jdbc:db2://test.capture.com:18588/CAPTURE
-incrementalRepositoryUsername=testsqlcap
-incrementalRepositoryPassword=testsqlcappwd
-incrementalRepositoryDriverClass=ccom.ibm.db2.jcc.DB2Driver
-incrementalRepositorySchema=PQCAPTURE
Compare two pureQueryXML files
java com.ibm.pdq.tools.ManageRepository
-report pureQueryXMLChanges
-oldPureQueryXml c:\pureQuery\testEnv\pdqArtifacts\demo.pdqxml.org
-newPureQueryXml c:\pureQuery\testEnv\pdqArtifacts\demo.pdqxml
-file c:\pureQuery\testEnv\pdqChanges\demo.html
-repositoryURL jdbc:db2://test.user.com:17593/SAMPLE
-repositoryUsername testid
-repositoryPassword testpwd
-repositoryDriverClass com.ibm.db2.jcc.DB2Driver
A connection to a database is required.