Working with the Repository Utility

Use repo_util to change the repository database. The repo_util scripts (repo_util.bat and repo_util.sh) are available in the <TDV_install_dir>/bin directory.

You can use this program to perform the following tasks:

Test the connection to the repository database
List the current repository configuration information
Export the repository configuration
Update the repository configuration
Create or drop the repository schema
Print diagnostic information about the TDV metadata repository

Syntax

repo_util.bat 
< ‑createSchema | ‑dropSchema | ‑dumpDiagnosticInfo | ‑exportConfig | ‑help | ‑listConfig | ‑testConn | ‑updateConfig >

[ ‑debug | ‑force ]

[ ‑configFile | ‑connectionUrl | ‑databaseCatalog | ‑databaseSchema | ‑databasePassword | ‑databaseUser | ‑driverClass | ‑driverClassPath | ‑driverName | ‑driverType | ‑repositoryClass | ‑schemaCreateScript | ‑schemaDropScript | ‑schemaInitializeScript ]

Options

Description

-configFile

Read database configuration options from this Java property file. The property names in the file must match the database option names defined in this section.

Run the repository utility with the ‑exportConfig option for an example of this file’s contents.

-connectionUrl

The JDBC URL that is used to connect to the external database. For example:

jdbc:PostgreSQL://localhost:3406/cs030101?continueBatchOnError=
false&useUnicode=true

-createSchema

Create the repository schema.

-databaseCatalog

Catalog that contains the TDV schema; blank if catalogs not supported.

-databasePassword

Database password.

-databaseSchema

Database schema that contains the TDV schema; blank if schemas not supported.

-databaseUser

Database user name.

-debug

Print debug messages.

-driverClass

Fully-qualified class name of a JDBC-compliant driver. For example: com.PostgreSQL.jdbc.Driver.

-driverClassPath

A semicolon- or colon-separated list of JAR files and directories. For example: /tmp/oracle40.jar:/tmp.

-driverName

Name of the TDV datasource driver name. Required for operation of the system tables.

-driverType

Name of the TDV data source driver type. Required for operation of the system tables.

-dropSchema

Drops the repository schema and all data contained within it. Permanently deletes all of the server’s data. (Use with caution.)

-dumpDiagnosticInfo

Print diagnostic information about the repository database.

-exportConfig

Export the repository database configuration in Java property file format. The output is suitable for use as a repository configuration file. See ‑configFile for details.

-force

Do not prompt for confirmation. (Use with caution.)

-help

Print this help information.

-listConfig

List the repository database configuration in a human readable format.

-repositoryClass

Repository class name.

-schemaCreateScript

Script containing the SQL commands to create the TDV schema.

-schemaDropScript

Script containing the SQL commands to drop the TDV schema.

-schemaInitializeScript

Script containing the SQL commands to initialize the TDV tables.

-testConn

Test the connection to the repository database.

-updateConfig

Change options in the repository database configuration. Specify new configuration options individually using command-line arguments, or collectively using the ‑configFile option. Unspecified options are left unchanged.

Sample Uses of the Repository Utility

Here are some uses of the repo_util program.

To list the server configuration information:
 repo_util.bat -listConfig
To export a repository configuration file:
 repo_util.bat -exportConfig > repo.properties
To update the repository database user name and password:
 repo_util.bat -updateConfig -databaseUser <user> 
-databasePassword <password>
To update the repository configuration using a repository configuration file, overriding the database password:
 repo_util.bat -updateConfig -configFile repo.properties 
-databasePassword <password>