Creating a repository

Using the ManageRepository utility, you can create a repository, or create an SQL script with the SQL statements that can be used to create a repository.

Before you begin

Ensure that your database system meets the requirements for creating a repository. For information about database system support, see System requirements for InfoSphere™ Optim™ pureQuery Runtime.

About this task

Using the ManageRepository utility with the -create repository option connects to the specified database and creates a repository. Using the -create repository option with the -generateScriptOnly option connects to the specified database and generates an SQL script that can create a repository in the specified database. If you specify the -generateScriptOnly option, the repository is not created.

Procedure

To create a repository:

  1. Create the repository. You create the repository using one of the following methods:
    • Issue the ManageRepository utility with the -create repository option.
    • Run the SQL script generated by the ManageRepository against the database.
  2. Optional: Use the ManageRepository utility with the -verify repository option to check the repository. If you created an SQL script to create a repository and modified the script before creating the repository, use the -verify repository option to ensure the repository was created correctly.

Example

The following command creates a connection to the database using the connection information and creates a repository:
java com.ibm.pdq.tools.ManageRepository
  -create repository
  -repositoryType pureQueryOnly
  -repositoryURL jdbc:db2://test.user.com:17593/SAMPLE 
  -repositoryUsername mytestid 
  -repositoryPassword testpwd 
  -repositoryDriverClass com.ibm.db2.jcc.DB2Driver
The following command creates a connection to the database and generates an SQL script that can be used create a repository in the database:
java com.ibm.pdq.tools.ManageRepository 
  -create repository
  -repositoryType pureQueryOnly
  -repositoryURL jdbc:db2://test.user.com:17593/SAMPLE 
  -repositoryUsername mytestid 
  -repositoryPassword testpwd 
  -repositoryDriverClass com.ibm.db2.jcc.DB2Driver
  -generateScriptOnly D:\test\scripts\createtest.sql
Note: You can modify the script to put tables in their own table spaces instead of the default table space. However, you cannot modify the schema name, table names, or column names.

Feedback