3 Running Repository Creation Utility 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.

For more information on how to run RCU from the command line, see the following topics:

Command-Line Syntax and Parameters

To run RCU from the command line, you need to specify a mode, an operation, and any necessary parameters. Make sure that you understand the syntax and the various command-line parameters you can use for your operation.

The syntax for the RCU command-line interface is:

rcu mode operation {parameters}

There are two modes (-silent and -interactive) and eight operations (-generateResponseFile, -responseFile, -createRepository, -generateScript, -dataLoad, -dropRepository, -listComponents, and -listSchemas). So, the command can be written out as follows:

rcu [-silent | -interactive] [-generateResponseFile | -responseFile | -createRepository | -generateScript | -dataLoad | 
-dropRepository | -listComponents | -listSchemas] 
{parameters}

The following topics describe each of the modes, operations, and parameters:

RCU Modes Available from the Command Line

There are two RCU modes available from the command line, -silent mode and -interactive mode.

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 about silent mode, see Using the -silent Command.

-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 prepopulate certain screens with the information that is specified in the response file or from the command line. You can prepopulate the Create Repository and Database Connection Details screens.

For more information about graphical mode, see Using the -interactive Command.

RCU Operations Available from the Command Line

There are eight RCU operations that are available from the command-line.

Table 3-2 RCU Operations Available from the Command Line

Command Description

-generateResponseFile

Run RCU with -silent to generate a RCU response file that contains all valid RCU command line parameters.

See Creating a RCU Response File from the Command Line

-responseFile

Run RCU with either -silent or -interactive to perform a RCU operation using a response file.

See Performing RCU Operations by Using a Response File

-createRepository

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

See Creating a Repository from the Command Line.

-generateScript

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

See Generating a System Load Script From the Command Line.

-dataLoad

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

See Loading Data Into the Repository From the Command Line.

-dropRepository

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

See Dropping a Repository from the Command Line.

-listComponents

Run RCU with -silent to generate a list of components for a given Oracle home.

See Generating a List of Components in an Oracle Home from the Command Line.

-listSchemas

Run RCU with -silent to list the schemas in a given database.

See Generating a List of Schemas in a Database from the Command Line.

RCU Command Line Parameters

You can pass the RCU command-line parameters to RCU as input by directly entering the parameters on the command line or by using a response file.

Table 3-3 RCU Command Line Parameters and Descriptions

Parameter Required? Valid for Which Operation? Description

-compInfoXMLLocation

No

-createRepository

-generateScript

-dataLoad

-dropRepository

The 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

-createRepository

-generateScript

-dataLoad

-dropRepository

The 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

-createRepository

-generateScript

-dataLoad

-dropRepository

-listSchemas

The type of database to which you are connecting.

If you perform 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 the 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 About System Load and Product Load.

-connectString

Yes

-createRepository

-generateScript

-dataLoad

-dropRepository

-listSchemas

The credentials to connect to your database.

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

host:port:sid

OR:

host:port/service

For all other database types, use:

server_name/host:port:database_name

-edition

No

-createRepository

-generateScript

-dataLoad

-dropRepository

-listSchemas

The edition name. This parameter is only valid if you specify databaseType=EBR.

-dbUser

Yes

-createRepository

-generateScript

-dataLoad

-dropRepository

-generateResponseFile

-listSchemas

The database user name. For example, the SYS user on Oracle databases).

This parameter is required if the —createWallet parameter is provided during the -generateResponseFile operation. RCU uses the database user name as the key or alias to store the database user password when generating a wallet. If the —createWallet parameter is not provided, the database user name is optional.

-dbRole

No

-createRepository

-generateScript

-dataLoad

-dropRepository

-listSchemas

The database user role. For example, SYSDBA for the SYS user on Oracle databases).

This parameter is needed only if -dbUser is specified and the role is SYSDBA.

-unicodeSupport

No

-createRepository

-dropRepository

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

-skipCleanupOnFailure

No

-createRepository

-generateScript

-dataLoad

If the schema creation fails, specify whether you want to skip the schema cleanup. The valid values are Yes or No. The default value is No.

-skipTablespaceDroponFailure

No

-createRepository

-generateScript

-dataLoad

If schema creation fails, whether or not you want to skip the schema cleanup. The valid values are Yes or No. The default value is No.

Specify Yes to retain tablespaces for failed components during schema cleanup. Specify No to drop tablespaces for failed components during schema cleanup.

-scriptLocation

No

-generateScript

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

-useSamePasswordForAllSchemaUsers

No

-createRepository

-dataLoad

-generateResponseFile

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

-selectDependentsForComponents

No

-createRepository

-generateScript

-dataLoad

-dropRepository

-generateResponseFile

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

STB schema is created independent of this switch, whether the value is true or false

-honorOMF

No

-createRepository

-generateScript

If the value is set to true, RCU creates datafiles using the Oracle-Managed Files (OMF) naming format.

The valid values are true or false. The default value is false.

-encryptTablespace

No

-createRepository

-generateScript

Specify whether you want to encrypt all new tablespaces that are created by RCU. This option is valid only if you have TDE (Transparent Data Encryption) enabled in the database (Oracle or Oracle EBR) when you start RCU. TDE tablespace encryption allows you to encrypt sensitive data stored in tablespaces.

The valid values are true or false. The default value is false. If the value is set to true, all new tablespaces created by RCU are encrypted only if TDE is enabled in the database.

Tablespaces that were created before RCU was launched cannot be encrypted by using this option.

-skipTablespaceDrop

No

-dropRepository

This parameter allows you to skip dropping tablespaces during the -dropRepository operation.

The valid values are Yes or No. Specify Yes to skip tablespace drop. The default value is No.

-variables

No

-createRepository

-generateScript

-dataLoad

-dropRepository

Comma-separated variables in the format variablename=value. See RCU Environment Variables for a list of RCU environment variables.

-schemaPrefix

No

-createRepository

-generateScript

-dataLoad

-dropRepository

-generateResponseFile

Prefix for your schemas. For more information about schema prefixes, see Planning Your Schema Creation and Select Components (for Create Operation).

This parameter is required for the -createRepository, -generateScript, -dataLoad, and -dropRepository operations.

Also, this parameter is required if the —createWallet parameter is provided during the -generateResponseFile operation. RCU uses the prefixed schema name as the key or alias to store schema passwords when generating a wallet. If the —createWallet parameter is not provided, the schema prefix is optional.

-component

Yes

-createRepository

-generateScript

-dataLoad

-dropRepository

ID of the component that 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, see About Repository Creation Utility Schemas, IDs, and Tablespaces. Multiple components are sometimes necessary because of dependencies; for example, you can not create the Oracle Platform Security Services (OPSS) schema if the Audit Services (IAU) schema does not exist. In this case, you must specify both schemas:

-component OPSS -component IAU

-tablespace

No

-createRepository

-generateScript

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

-tempTablespace

No

-createRepository

-generateScript

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

-createWallet

No

-generateResponseFile

Provide this parameter if you want to create a wallet file to securely store your RCU passwords, such as the database user password, schema passwords, and custom variable passwords.

RCU accepts password credentials stored in an Oracle Wallet. That is, you can use the generated wallet later in silent situations to provide your passwords to RCU without having to directly enter any passwords on the command line.

The wallet is generated in the same directory as the response file.

-walletDir

No

-createRepository

-generateScript

-dataLoad

-dropRepository

-listSchemas

The absolute path of the wallet directory where your RCU passwords that are used for creating or dropping schemas are stored. If you choose to use a wallet to pass passwords to RCU, RCU retrieves the required passwords from the specified directory. This option is valid for silent mode only.

If you use this option, the wallet must already exist and contain the required passwords. If the wallet does not contain the required passwords, RCU prompts you for the missing passwords on the command line.

This directory should contain a valid cwallet.sso file. RCU supports auto-login wallets only (password is not needed to open wallet).

-responseFileDir

No

-generateResponseFile

The absolute path of the response file directory.

If specified, RCU generates a response file named rcuResponseFile.properties in the given directory.

If not specified, RCU generates a response file in the $HOME/.rcu directory by default.

-componentList

No

-generateResponseFile

Comma-separated list of component IDs for the components in the Oracle home that you want to add to the response file. To generate a list of valid component IDs for a specific Oracle home, see Generating a List of Components in an Oracle Home from the Command Line.

If not specified, all valid components in the Oracle home are added to the response file by default.

-validate

No

-createRepository

-generateScript

-dataLoad

-dropRepository

Use this option to execute validation checks in silent mode and verify that all prerequisites for the specified operation have been met.

With this option, RCU only checks for the prerequisites that are required to perform the operation and then exits. For more information about validate parameter, see Using the -validate Parameter to Verify Prerequisites.

-schemaPrefixes

No

-listSchemas

Comma-separated list of schema prefixes. If provided, RCU only lists the schemas with the given prefixes.

Using the -silent Command

Use the -silent command if you want to run RCU with minimal interaction once you have entered the command.

Run RCU for all databases in silent mode

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 prompts you for the database and component schema passwords from the command line. If you specify multiple components, you are prompted for the passwords in the order in which the components are specified.

Instead of directly entering all the RCU parameters on the command line, you can provide the location and name of a file that contains certain input values. This file (called a response file) allows you to pass values for all valid command-line parameters to RCU through a text file. When you run RCU with a response file, all values are read from the file to create or drop your schemas. For more information about response file, see Using Response Files.

If you want to avoid all interaction from the command line, you can create a text file contains 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

When schemas are created for multiple components, -tablespace and  -tempTablespace has to be declared for each component individually.

For example:

 ./rcu -silent -createRepository -connectString <connectString> -dbUser SYS 
 -dbRole SYSDBA -schemaPrefix DEV01 -selectDependentsForComponents true \ 
 -component MDS -tablespace FMW_INFRA -tempTablespace TEMP \ 
 -component IAU -tablespace FMW_INFRA -tempTablespace TEMP \ 
 -component IAU_APPEND -tablespace FMW_INFRA -tempTablespace TEMP \ 
 -component IAU_VIEWER -tablespace FMW_INFRA -tempTablespace TEMP \ 
 -component STB -tablespace FMW_INFRA -tempTablespace TEMP -f <

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.

Instead of using a plain text password file, you can also create an Oracle Wallet file that contains all the necessary passwords and then use the -walletDir parameter to pass this file to RCU. In this case, RCU does not prompt you for any passwords that are stored in the wallet. For more information about using wallet, see Using a Wallet to Store Passwords.

For more information on running RCU in -silent mode, see the following topics:

Run RCU for ATP-D databases in silent mode

Note:

To create schemas on ATP-D database for Oracle GoldenGate, you can use only the silent command and cannot use the Repository Creation Utility screens (GUI mode).

For example, use the following command to run RCU in silent mode:

./rcu -silent -createRepository -connectString '(description=(CONNECT_TIMEOUT=120)(RETRY_COUNT=20)(RETRY_DELAY=3) \
(TRANSPORT_CONNECT_TIMEOUT=3)(ADDRESS_LIST=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=protocol_name) \
(HOST=host_name)(PORT=port_number)))(CONNECT_DATA=(SERVICE_NAME=service_name))) -dbUser admin -dbRole normal \
-useSSL -sslArgs javax.net.ssl.trustStore=/home/opc/veridata/cwallet.sso,javax.net.ssl.trustStoreType=SSO, \
javax.net.ssl.keyStore=/home/opc/veridata/cwallet.sso,javax.net.ssl.trustStoreType=SSO,oracle.net.ssl_server_dn_match=true, \
oracle.net.ssl_version=1.2 -useSamePasswordForAllSchemaUsers true -selectDependentsForComponents true \
-schemaPrefix OGG1ATP  -component UCSUMS \
-component OPSS -component IAU -component STB -component WLS -component IAU_APPEND -component IAU_VIEWER -component MDS -component VERIDATA \
-serverDN "CN=adwc.uscom-east-1.oraclecloud.com,OU=Oracle BMCS US,O=OracleCorporation,L=Redwood City,ST=California,C=US"

Using the -validate Parameter to Verify Prerequisites

Before you run an operation from the command line, you can use the —validate option in silent mode to verify that all RCU prerequisites have been met.

When you run RCU with the -validate option, RCU performs validation checks to validate all prerequisites for the specified operation, and then exits. For example, this command validates the values for any command-line parameters and verifies that the minimum requirements are met in the database prior to schema creation.

You can add the —validate option to any valid operation to run the validation checks, as shown in the following example:

./rcu -silent -createRepository -useSamePasswordForAllSchemaUsers true -databaseType ORACLE
-connectString examplehost.exampledomain.com:1521:exampleSID  -dbUser sys -dbRole sysdba 
-selectDependentsForComponents true -schemaPrefix DEV -component MDS -component OPSS 
-component STB -component BIPLATFORM -validate

If a prerequisite check fails, RCU returns a non-zero exit code and prints the issue to the console. You can refer to the command output and log file to manually fix the issue, and then rerun the —validate command to ensure that all checks are successful.

If all prerequisite checks pass, the exit status is zero (0).

If a validation check fails, the following table provides more information about the exit codes returned by RCU.

Validation Check Description Exit Code Number

Database Connection Check

Validates the provided connection credentials for the database in which you create or drop schemas.

This check ensures that a database connection can be established by using the values provided for the database connect string, user name, and password.

If the -encryptTablespace true option is provided, RCU verifies that TDE (Transparent Data Encryption) is enabled in the database.

  • Database connection failed: 100

  • Unsupported database type: 101

  • Empty field: 102

  • Invalid port: 103

Global Prerequisites Check

Verifies the global prerequisites listed in the global ComponentInfo.xml file (in ORACLE_HOME/oracle_common/rcu/config).

For example, this check verifies the database version and the values for the database initialization parameters.

  • Global prerequisite failed: 200

  • Metadata initialization failed: 201

  • TDE not enabled: 202

Schema Prefix Check

Validates the -schemaPrefix parameter.

  • For the create operation, RCU ensures that the prefix follows the expected pattern and does not exceed the allowed number of characters.

  • For the drop operation, RCU ensures that the schema prefix already exists.

  • Schema prefix validation failed: 300

Component Name Check

Validates the list of component schema names provided.

For the create operation, RCU ensures that the components do not exist for the given prefix and any dependent components are selected.

  • Component validation failed: 400

  • Component dependency validation failed: 401

Schema Password Check

Verifies that a given schema password follows the supported password pattern and does not exceed 30 characters.

  • Schema password validation failed: 700

Component Prerequisites Check

Validates the component-specific prerequisites of each component.

The prerequisites are listed in the component repository configuration file (component.xml) in ORACLE_HOME/product_directory/common/sql/component for each component.

  • Component prerequisite failed: 500

Tablespace Validation Check

Validates the tablespace names and verifies that the tablespace prerequisites are met.

  • Tablespace validation failed: 600

  • Mapping tablespace to component validation failed: 601

Custom Variables Check

Validates component custom variables and their values.

  • Custom variable validation failed: 800

Script Location Validation Check

Validates the value provided for the –scriptLocation argument and checks whether the value is null or empty.

  • Value for –scriptLocation argument is invalid or not provided: 900

Using a Wallet to Store Passwords

If you are running RCU from the command line, password credentials (for example, schema passwords) can be stored in an Oracle Wallet file. This wallet file can be provided to RCU from the command line.

When you run RCU from the command line, RCU prompts you to enter values for any required passwords by default. To avoid entering passwords on the command line, you can create a wallet file to securely store any necessary password credentials. You can then pass the wallet to RCU by providing the wallet location with the walletDir parameter.

Creating a Wallet Using RCU

A wallet for providing RCU passwords can be generated by RCU as part of the response file creation:

Once the wallet is created, this file can be reused to store and provide passwords for multiple sessions.

RCU only supports auto-login wallets (no password is needed to open a wallet). Password-protected wallets are not supported.

When RCU generates the wallet, RCU uses the prefixed schema name as the key or alias for storing schema passwords, which allows you to reuse the same wallet for multiple sessions. For the database user password, the alias is the database user name (for example, SYS). If the same password is used for all the schemas, then RCU uses the alias prefix_COMMON_SCHEMA_PASSWORD to save the password in the wallet.

Example 3-1 Using the -walletDir Parameter

After the wallet is created and contains the necessary passwords, use the —walletDir parameter to pass this file to RCU so that you do not have to directly enter your passwords on the command line. Alternatively, the wallet location can be provided to RCU through a response file.

For example:

./rcu -silent -createRepository -connectString examplehost.exampledomain.com:1521:example_sid -dbUser sys -dbRole sysdba 
-schemaPrefix DEV -component MDS -component STB -walletDir /home/exampleuser/wallet

When you pass the wallet to RCU, RCU expects all the necessary passwords required to perform an operation to be in the wallet, which include your:

  • Database user password

  • Schema passwords

  • Custom Variable passwords (for Oracle Data Integrator)

In this example, the wallet should contain passwords for the database user (sys), the Metadata Services (MDS) schema, and the Service Table (STB) schema. If a wallet does not contain all the necessary passwords, you are prompted to enter the missing passwords on the command line.

Using the -interactive Command

Use the -interactive command to run the RCU graphical interface. This is the default value 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:

Figure 3-1 Database connection Details — blank screen

Description of Figure 3-1 follows
Description of "Figure 3-1 Database connection Details — blank screen"

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:

Figure 3-2 Database Connection Details

Description of Figure 3-2 follows
Description of "Figure 3-2 Database Connection Details"

When you run the RCU graphical interface, you can provide the location and name of a file (called a response file) that contains certain input values (for example, your database connection information). When you use the graphical interface, you are prompted for these values. The values you enter in a response file can be used to populate certain RCU screens. For more information about using response file, see Using Response Files.

Using Response Files

Before you run RCU, you can provide information that is required to perform a specific operation in a response file. For example, you can provide your database connection details, a list of components to be added or dropped, and the schema prefix to RCU through a response file.

You can use a response file to automate a RCU session. When you run RCU by using a response file, RCU reads the information provided in the response file to complete the operation.

For more information, see the following topics:

About Response Files

A response file is a properties file in which all RCU command-line parameters can be provided as input to RCU to perform an operation.

Rather than directly entering the RCU Command Line Parameters on the command line, you can provide values for these parameters to RCU through a text file. You can generate this file from the RCU graphical interface by using the values you provide in the RCU screens or from the command line. After you create a response file, the parameters can be modified in a text editor or be used exactly as-is to perform an operation at a later time.

If you choose to run RCU from the command line with a response file, the values you specify in a response file are the values for the RCU parameters that you would normally provide on the command line during a typical silent RCU session. If you choose to run the RCU graphical interface with a response file, the values you specify in a response file are used to prepopulate the fields on certain screens.

Creating a RCU Response File from the Graphical Interface

Use the Save Response File option on the Summary screen to save the information you provide in the RCU screens to a response file.

After you click the Save Response File option, you are prompted to specify a location to create this file. By default, RCU saves the response file in the $HOME/.rcu directory.

Because the response file needs to contain password information, RCU provides the Save Passwords in Wallet option to securely store any passwords that you provide on the RCU screens in a wallet. You can use the wallet later in silent situations to provide the necessary passwords to RCU so that you do not have to directly enter your passwords on the command line. When you run RCU from the command line, the wallet location can be passed to RCU on the command line or through a response file. If a wallet directory is not passed to RCU, you are prompted for the required passwords.

Creating a RCU Response File from the Command Line

Use the -generateResponseFile command to generate a response file.

The full syntax for the RCU command-line interface to generate a RCU response file is shown below:

rcu -silent -generateResponseFile
  [-responseFileDir absolute_path_of_response_file_directory]
  [-schemaPrefix schema_prefix]  
  [-componentList list_of_component_IDs]
  [-createWallet]
  [-useSamePasswordForAllSchemaUsers [true|false]]
  [-selectDependentsForComponents [true|false]]
  [-dbUser database_username]

If the —createWallet parameter is provided, then values for —dbUser and —schemaPrefix are required. Otherwise, the —dbUser and —schemaPrefix parameters are optional. RCU uses the prefixed schema name and the database user name as the key or alias to store schema passwords and the database user password in the wallet, respectively.

If you provide the—createWallet and the —useSamePasswordForAllSchemaUsers true parameters on the command line, then all schema passwords are set to the same value in the wallet.

If the —createWallet parameter is provided, RCU will prompt you to enter a value for each password that is stored in the wallet.

Below is a sample command to generate a response file on a UNIX operating system:

./rcu -silent -generateResponseFile -componentList OPSS,IAU -schemaPrefix DEV -createWallet 
-responseFileDir /home/exampleuser/rcu -useSamePasswordForAllSchemaUsers true 
-selectDependentsForComponents true -dbUser sys

In this example, a response file and wallet is created in the /home/exampleuser/rcu directory, and the information provided on the command line (such as the list of components) is added to the response file.

Performing RCU Operations by Using a Response File

Use the -responseFile command to perform an operation with a response file. You use a response file to provide input to RCU to automate an operation from the command line or from the graphical interface.

If you choose to run the graphical interface with a response file, RCU prepopulates certain RCU screens (such as the Database Connection Details screen) based on the input values that you provide in a response file. If you choose to run RCU from the command line, you can use a response file to provide values for all valid RCU parameters rather than directly entering these parameters on the command line.

The full syntax for the RCU command-line interface to perform a RCU operation with a response file is shown below:

rcu [-silent|-interactive] -responseFile absolute_path_of_response_file

Following is a sample command to automate a silent RCU session by using a response file on a UNIX operating system:

./rcu -silent -responseFile /home/exampleuser/rcu/rcuResponseFile.properties

Note:

  • If you provide a value for a parameter on the command line and in the response file, RCU uses the value that is provided on the command line.

  • Before you run RCU, ensure that you have provided the required information in the response file. If some of the mandatory properties in the response file are missing values when you run RCU, RCU will notify you and exit.

  • When you run RCU, the dbRole parameter is not normally required to connect to certain databases (for example, SQL Server). However, when a RCU response file is generated, the dbRole parameter is marked as required in the response file by default. As a result, if you use a response file, the dbRole field must not be left blank, even if the database role is not required to connect to a database like SQL Server.

Creating a Repository from the Command Line

If you are a user with full SYS or SYSDBA privileges, use the -createRepository operation to create a repository.

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

rcu [-silent | -interactive] -createRepository
	[-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]]
	[-skipCleanupOnFailure [true|false]]
	[-skipTablespaceDropOnFailure [Yes|No]]
	[-useSamePasswordForAllSchemaUsers [true|false]]
	[-selectDependentsForComponents [true|false]]
	[-honorOMF [true|false]]
	[-encryptTablespace [true|false]]
	[-variables variablename=value]
	[-schemaPrefix schema_prefix]
	-component component_ID
	[-tablespace component_tablespace_name]
	[-tempTablespace component_temp_tablespace_name]
	[-walletDir absolute_path_of_wallet_directory]
	[-validate]

When you specify the -component, you must use the correct component IDs, which are listed in About Repository Creation Utility Schemas, IDs, and Tablespaces.

Before you create any schemas, you must be aware of and specify all dependencies for the component that 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 stops before any loading takes place.

Following 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

Generating a System Load Script From the Command Line

If you are a user without SYS or SYSDBA privileges, use the -generateScript operation to generate a script. A user with DBA privileges can run the script later to complete the system load phase.

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

rcu [-silent | -interactive] -generateScript
	[-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]
	[-skipCleanupOnFailure [Yes|No]]
	[-skipTablespaceDropOnFailure [Yes|No]]
 	[-scriptLocation script_location]
	[-selectDependentsForComponents [true|false]]
	[-honorOMF [true|false]]
	[-encryptTablespace [true|false]]
	[-variables variablename=value]
	[-schemaPrefix schema_prefix]
	-component component_ID
	[-tablespace component_tablespace_name]
	[-tempTablespace component_temp_tablespace_name]
	[-walletDir absolute_path_of_wallet_directory]
	[-validate]

When specifying the -component, you must use the correct component IDs, which are listed in About Repository Creation Utility Schemas, IDs, and Tablespaces.

Before you create a script, you must be aware of and specify the 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 stops before completing 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 /tmp/RCUdate_timestamp_random_number/logs/ -schemaPrefix TEST 
-component OPSS -component MDS

Loading Data Into the Repository From the Command Line

After the system load scripts are run by a user with DBA privileges, any user can then use the -dataLoad operation to load data into a repository.

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

rcu [-silent | -interactive] -dataLoad
	[-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]
	[-skipCleanupOnFailure [Yes|No]]
	[-skipTablespaceDropOnFailure [Yes|No]]
	[-useSamePasswordForAllSchemaUsers [true|false]]
	[-selectDependentsForComponents [true|false]]
	[-variables variablename=value]
	[-schemaPrefix schema_prefix]
	-component component_ID
	[-walletDir absolute_path_of_wallet_directory]
	[-validate]

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

Dropping a Repository from the Command Line

Use the -dropRepository operation to drop a repository.

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]]
	[-selectDependentsForComponents [true|false]]
	[-skipTablespaceDrop [Yes|No]]
	[-variables variablename=value]
	[-schemaPrefix schema prefix]
	-component component_ID
	[-walletDir absolute_path_of_wallet_directory]
	[-validate]

You must also be aware of schema dependencies when dropping schemas (see About Repository Creation Utility Schemas, IDs, and Tablespaces). 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 stops 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

Generating a List of Components in an Oracle Home from the Command Line

Use the -listComponents command to generate a list of valid components that are available in a given Oracle home. This command displays the name, component ID, and the supported database types for each component that is available in the Oracle home in which RCU was started.

The full syntax for the RCU command-line interface to generate a list of components is shown below:

rcu -silent -listComponents

The Component ID and database type displayed for each component in the command output are the values that you must specify with the -component and —databaseType parameters, respectively, when you create schemas from the command line.

Generating a List of Schemas in a Database from the Command Line

Use the -listSchemas command to generate a list of valid schemas in a given database.

The full syntax for the RCU command-line interface to list the schemas in a database is shown below:

rcu -silent -listSchemas
    [-databaseType [ORACLE|EBR]]
    -connectString database_connect_string
    [-edition edition_name]
    -dbUser database_username
    [-dbRole database_user_role]
    [-schemaPrefixes comma_separated_list_of_prefixes]
    [-walletDir absolute_path_of_wallet_directory]

Below is a sample command to list the schemas in an Oracle database on a UNIX operating system:

./rcu -silent -listSchemas -databaseType ORACLE -connectString examplehost.exampledomain.com:1521:exampleSID 
-dbUser sys -dbRole sysdba

You can also specify a comma-separated list of prefixes using the —schemaPrefixes argument. If provided, RCU only displays the schemas with those prefixes.

For example:

./rcu -silent -listSchemas -databaseType ORACLE -connectString examplehost.exampledomain.com:1521:exampleSID -dbUser sys 
-dbRole sysdba -schemaPrefixes DEV,DEV1

RCU Environment Variables

The RCU environment variables are the variables picked up by RCU from the environment. If an environment variable is not set, then RCU uses the default value.

Table 3-4 RCU Environment Variables

Variable Default Value Description

RCU_LOG_LOCATION

/tmp (UNIX operating systems)

C:\Users\user_name\AppData\Local\Temp (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.

RCU_JAVA_OPTIONS

N/A

Set this variable to any Java Virtual Machine (JVM) argument.

For example:

setenv RCU_JAVA_OPTIONS -Djava.io.tmpdir=/scratch/mytmpDir