2.2.3 db-scripts

usage: db-scripts create-properties [-p, --properties-file <properties file>] | 
extract [-d, --output-directory <db script directory>] [-p, --properties-file <properties file>] 

This command is used to extract database creation files from an installed system. This is useful when you want to change the Platform database type, e g from Derby to Oracle or PostgreSQL. For further information about how to change the database type, see 8.3 Changing Platform Database in the System Administrator's Guide.

create-properties

Use db-scripts create-properties to generate a properties file. For further information about the properties in this file, see 3.1.3.2 Properties for Oracle and 3.1.3.3 Properties for PostgreSQL in the Installation Instructions. 

OptionDescription

[-p, --properties-file <properties file>

The target path and filename for the properties file.

Example - Creating the properties file

MZ>> db-scripts create-properties --properties-file /tmp/dbscript.prop

 

extract

Use db-scripts extract to extract the database creation files. The database scripts are based on the properties file.

For further information about how to use these scripts, see 8.3 Changing Platform Database in the System Administrator's Guide.

OptionDescription

[-p, --properties-file <properties file>

The properties file to be used as input.

[-d, --output-directory <db script directory>]The location of the database scripts to be extracted.

Example - Extracting the create scripts

MZ>> db-scripts extract --output-directory /tmp/dbscripts \
--properties-file /tmp/dbscript.prop

 

Return Codes

Listed below are the different return codes for the db-scripts command: 

 

CodeDescription

0

Will be returned if the command was successful or unsuccessful.

1

Will be returned if the argument count is incorrect.

2Will be returned if the properties file to be created already exists or if the specified target directory does not exist.
3Will be returned if the specified target directory for the database scripts does not exist.
4Will be returned if the database folder in the specified target directory for the database already exists.