3 Running Repository Creation Utility from the Command Line

This chapter describes how to run RCU from the command line.

The command-line interface (CLI) is necessary for integration with both the Oracle Fusion Middleware installer and Enterprise Manager during application deployment. Additionally, you can use the CLI in cases where Xserver is not configured or if you are using a telnet terminal that does not have proper display capabilities.

This chapter contains the following topics:

3.1 Command Line Syntax and Parameters

The syntax for the RCU command line interface is:

rcu mode operation {parameters}

There are two modes (-silent and -interactive) and four operations (-createRepository, -generateScript, -dataLoad, and -dropRepository) so the command can be written out as follows:

rcu [-silent | -interactive] [-createRepository | -generateScript | -dataLoad | -dropRepository] {parameters}

The tables in this section describe each of the modes, operations, and parameters:

Table 3-1 lists and describes the RCU modes available from the command line.

Table 3-1 RCU Modes Available from the Command Line

Command Description

-silent

Run RCU with minimal or no interaction from the command line.

For more information, see Section 3.2.

-interactive

Run the RCU graphical interface. This is the default if neither -silent nor -interactive is specified.

This command (whether specified or not) allows you to pre-populate certain screens with information as specified from the command line. You can pre-populate the Create Repository and Database Connection Details.

For more information, see Section 3.3.


Table 3-2 lists and describes the RCU operations available from the command line.

Table 3-2 RCU Operations Available from the Command Line

Command Description

-createRepository

Run RCU with either -silent or -interactive to create a repository.

For more information, see Section 3.4.

-generateScript

Run RCU with either -silent or -interactive to generate a script for system load.

For more information, see Section 3.5.

-dataLoad

Run RCU with either -silent or -interactive to load data into the repository.

For more information, see Section 3.6.

-dropRepository

Run RCU with either -silent or -interactive to drop a repository.

For more information, see Section 3.7.


Table 3-3 lists and describes the various command line parameters.

Table 3-3 RCU Command Line Parameters and Descriptions

Parameter Required? Valid for Which Operation? Description

-compInfoXMLLocation

No

All

Full path to the location of the ComponentInfo.xml file. The default location is ORACLE_HOME/oracle_common/rcu/config (on UNIX operating systems) or ORACLE_HOME\oracle_common\rcu\config (on Windows operating systems).

-storageXMLLocation

No

All

Full path to the location of the StorageInfo.xml file. The default location is ORACLE_HOME/oracle_common/rcu/config (on UNIX operating systems) or ORACLE_HOME\oracle_common\rcu\config (on Windows operating systems).

-databaseType

No

All

Type of database to which you are connecting.

If you are performing the system load and product load concurrently as a user with full DBA privileges, the valid options are ORACLE, SQLSERVER, IBMBD2, MYSQL, or EBR.

If you do not have permissions to perform system load and product load concurrently and need to generate a script, you can only use the ORACLE and EBR database types.

For more information about system load and product load, see Section 1.2.1.

-connectString

Yes

All

Credentials for connecting to your database.

For Oracle or EBR-enabled databases, use the following format:

host:port:sid

For all other database types, use:

server_name/host:port:database_name

-edition

No

All

Edition name. This is only valid if you specify databaseType=EBR.

-dbUser

Yes

All

Database user name (for example, the default user name on Oracle databases is SYS).

-dbRole

No

All

Database user role (for example, SYSDBA for the SYS user on Oracle databases).

-unicodeSupport

No

-createRepository

-dropRepository

Specify Yes or No for unicode support. Default is Yes. This is only valid if you specify databaseType=SQLSERVER.

-skipCleanupOnFailure

No

-createRepository

-generateScript

-dataLoad

Whether or not you want to skip the schema cleanup if schema creation fails. Valid values are Yes or No. The default is No.

-scriptLocation

No

-generateScript

Specify the location to save the generated script for system load repository.

-useSamePasswordForAllSchemaUsers

No

-createRepository

-generateScript

-dataLoad

Whether or not you want to use the same password for all schemas. Valid values are true or false. The default is false.

-selectDependentsForComponents

No

-createRepository

-generateScript

-dataLoad

Whether or not you want to have RCU automatically select dependent schemas for your components. Valid values are true or false. The default is false.

-variables

No

All

Comma separated variables in the format variablename=value. See Section 3.8 for a list of RCU environment variables.

-schemaPrefix

No

All

Prefix for your schemas. For more information about schema prefixes, refer to Section 1.2.5 and Section A.4.

-component

Yes

All

ID of the component(s) you want to add or drop. To specify a single component, use the format:

-component component_ID

To specify multiple components, use the format:

-component component_ID -component component_ID

For a list of valid component (schema) IDs, refer to Appendix B. Multiple components are sometimes necessary because of dependencies; for example, you cannot create the Oracle Platform Security Services (OPSS) schema if the Audit Services (IAU) schemas does not already exist. In this case, you must specify both schemas:

-component OPSS -component IAU

-tablespace

Yes

-createRepository

-generateScript

Tablespace name of the component. This tablespace must exist in the database if you are using this option.

-tempTablespace

Yes

-createRepository

-generateScript

TEMP tablespace name of the component. This tablespace must exist in the database if you are using this option.


3.2 Using the -silent Command

Specify -silent if you want to run RCU with minimal interaction once you have entered the commend. You must specify all mandatory command line parameters in the command. For example:

rcu -silent -createRepository -connectString database_connect_string -dbUser -database_user -component component

In this scenario, RCU will prompt you for the database and component schema passwords from the command line. If you specify multiple components, you will be prompted for the passwords in the order in which the components are specified.

If you want to avoid all interaction from the command line, you can create a text file containing all the necessary passwords (one password per line) and then use the -f option to pass this password file to RCU. For example, if you create a file called passwordfile.txt, you can use the command below:

rcu -silent -createRepository -connectString database_connect_string -dbUser -database_user -component component1_name -component component2_name -f < passwordfile.txt

The passwordfile.txt file would contain, in order:

database_password
component1_schema_password
component2_schema_password

It is important to make sure that the passwords in the file are specified in the same order as the components on the command line.

Once the installation is complete the password file must be removed. The passwords are maintained in cleartext format and therefore present a security risk if the password file is left in place after installation.

3.3 Using the -interactive Command

Specify -interactive to run the RCU graphical interface. This is the default if neither -silent nor -interactive is specified.

You can specify information from the command line that would be populated in the graphical interface to expedite your RCU operation. For example, if you run RCU with the following command:

./rcu

The Database Connection Details page contains blank fields, as shown below:

rcu database connection details screen
Description of the illustration database_interactive_1.gif

But if you run RCU with a few parameters from the command line:

./rcu -interactive -createRepository -connectString examplehost.exampledomain.com:1521:example_sid -dbUser SYS -component MDS

The Database Connection Details page contains the information supplied from the command line:

rcu database connection details screen
Description of the illustration database_interactive_2.gif

3.4 Creating a Repository from the Command Line

The full syntax for the RCU command line interface to create a repository is shown below:

rcu [-silent | -interactive] -createRepository
   [-compInfoXMLLocation omponentInfo.xml_file_location]
   [-storageXMLLocation Storage.xml_file_location]
   [-databaseType [ORACLE|EBR]]
   -connectString database_connect_string
   [-edition edition_name]
   -dbUser database_username
   [-dbRole database_user_role]
   [-unicodeSupport [Yes|No]]
   [-skipCleanupOnFailure [Yes|No]]
   [-useSamePasswordForAllSchemaUsers [true|false]]
   [-selectDependentsForComponents [true|false]]
   [-variables variablename=value]
   [-schemaPrefix schema_prefix]
   -component component_ID
   -tablespace component_tablespace_name
   -tempTablespace component_temp_tablespace_name

In order to work properly, make sure that the parameters are specified in the same order that they are listed. For example, do not specify the -compInfoXMLLocation parameter before the -component parameter.

When specifying the -component, you must use the correct component IDs, which are listed in Appendix B.

Before you create any schemas, you must be aware of and specify all dependencies for the component you are loading. For example, the SOAINFRA schema depends on the MDS and ORASDPM schemas; if you try to load the SOAINFRA schema without specifying both the MDS and ORASDPM schemas, or if the MDS and ORASDPM schemas do not already exist in the database, RCU will stop before any loading takes place.

Below is a sample command to create the OPSS schema on a UNIX operating system:

./rcu -silent -createRepository -databaseType ORACLE -connectString examplehost.exampledomain.com:1521:exampleSID -dbUser sys -dbRole sysdba -schemaPrefix TEST -component OPSS -component MDS

3.5 Generating a System Load Script From the Command Line

The full syntax for the RCU command line interface to generate a system load script is shown below:

rcu [-silent | -interactive] -generateScript
   [-compInfoXMLLocation omponentInfo.xml_file_location]
   [-storageXMLLocation Storage.xml_file_location]
   [-databaseType [ORACLE|EBR]]
   -connectString database_connect_string
   [-edition edition_name]
   -dbUser database_username
   [-dbRole database_user_role]
   [-skipCleanupOnFailure [Yes|No]]
   [-scriptLocation script_location]
   [-useSamePasswordForAllSchemaUsers [true|false]]
   [-selectDependentsForComponents [true|false]]
   [-variables variablename=value]
   [-schemaPrefix schema_prefix]
   -component component_ID
   -tablespace component_tablespace_name
   -tempTablespace component_temp_tablespace_name

In order to work properly, make sure that the parameters are specified in the same order that they are listed. For example, do not specify the -compInfoXMLLocation parameter before the -component parameter.

When specifying the -component, you must use the correct component IDs, which are listed in Appendix B.

Before you create a script, you must be aware of and specify all component dependencies. For example, the SOAINFRA schema depends on the MDS and ORASDPM schemas; if you specify the SOAINFRA schema without specifying both the MDS and ORASDPM schemas, or if the MDS and ORASDPM schemas do not already exist in the database, RCU will stop before competing the operation.

Below is a sample command to create a system load script on a UNIX operating system:

./rcu -silent -generateScript -databaseType ORACLE -connectString examplehost.exampledomain.com:1521:exampleSID -dbUser sys -dbRole sysdba -scriptLocation /home/Oracle/Products/Oracle_Home/oracle_common/rcu/log/logdir.date_timestamp -schemaPrefix TEST -component OPSS -component MDS

3.6 Loading Data Into the Repository From the Command Line

The full syntax for the RCU command line interface to load data into a repository is shown below:

rcu [-silent | -interactive] -dataLoad
   [-compInfoXMLLocation omponentInfo.xml_file_location]
   [-storageXMLLocation Storage.xml_file_location]
   [-databaseType [ORACLE|EBR]]
   -connectString database_connect_string
   [-edition edition_name]
   -dbUser database_username
   [-dbRole database_user_role]
   [-skipCleanupOnFailure [Yes|No]]
   [-useSamePasswordForAllSchemaUsers [true|false]]
   [-selectDependentsForComponents [true|false]]
   [-variables variablename=value]
   [-schemaPrefix schema_prefix]
   -component component_ID

Below is a sample command to perform a data load on a UNIX operating system:

./rcu -silent -dataLoad -databaseType ORACLE -connectString examplehost.exampledomain.com:1521:exampleSID -dbUser sys -dbRole sysdba -schemaPrefix TEST -component OPSS -component MDS

3.7 Dropping a Repository from the Command Line

The full syntax for the RCU command line interface to drop a repository is shown below:

rcu [-silent | -interactive] -dropRepository
   [-compInfoXMLLocation ComponentInfo.xml_file_location]
   [-storageXMLLocation Storage.xml_file_location]
   [-databaseType [ORACLE|EBR]]
   -connectString database_connect_string
   [-edition edition_name]
   -dbUser database_username
   [-dbRole database_user_role]
   [-unicodeSupport [Yes|No]]
   [-variables variablename=value]
   [-schemaPrefix schema prefix]
   -component component_ID

In order to work properly, make sure that the parameters are specified in the same order that they are listed. For example, do not specify the -compInfoXMLLocation parameter before the -component parameter.

You must also be aware of schema dependencies when dropping schemas (see Appendix B). For example, several schemas require the MDS schema to be present; if you choose to drop the MDS schema, then all the schemas that require the MDS schema will stop working.

Below is a sample command to drop the OPSS schema on a UNIX operating system:

./rcu -silent -dropRepository -databaseType ORACLE -connectString examplehost.exampledomain.com:1521:exampleSID -dbUser sys -dbRole sysdba -schemaPrefix TEST -component OPSS

3.8 RCU Environment Variables

Table 3-4 shows the variables picked up by RCU from the environment. If the environment variable is not set, then RCU uses the default value.

Table 3-4 RCU Environment Variables

Variable Default Description

RCU_LOG_LOCATION

ORACLE_HOME/oracle_common/rcu/log (UNIX operating systems)

ORACLE_HOME\oracle_common\rcu\log (Windows operating systems)

Location of the RCU log file.

RCU_TIMESTAMP_LOG_DIR

true

Determines whether or not a directory with the format logdir.yyyy-dd_hh-mm is created for the RCU log file.

Set this variable to true or false.

RCU_LOG_NAME

rcu.log

Name of the RCU log file.

RCU_LOG_LEVEL

ERROR

Determines the RCU log level.

Set this variable to one of SEVERE, ERROR, NOTIFICATION, or TRACE.