Fusion Middleware Documentation
Advanced Search


Creating Schemas with the Repository Creation Utility
Close Window

Table of Contents

Show All | Collapse

2 Obtaining and Running Repository Creation Utility

This chapter contains instructions for obtaining and running the Repository Creation Utility (RCU).

This chapter contains the following sections:

2.1 Obtaining RCU

In 12c (12.1.2), RCU is available with the Oracle Fusion Middleware Infrastructure distribution. For information about how to install this software and obtain RCU, see Installing and Configuring the Oracle Fusion Middleware Infrastructure.

2.2 Starting RCU

After Oracle Fusion Middleware Infrastructure is installed, start RCU from the ORACLE_HOME/oracle_common/bin directory.

Note:

If you are running RCU using a non-English database, set the following environment variables:

setenv LANG en_US.UTF8
setenv LC_ALL $LANG
setenv NLS_LANG american_america

On Linux operating systems:

cd ORACLE_HOME/oracle_common/bin
./rcu

On Windows operating systems:

cd ORACLE_HOME\oracle_common\bin
rcu.bat

RCU provides a command line interface in situations where Xserver is not available or you have access to telnet terminals without display capabilities. The command line interface also allows you to embed RCU from command line scripts or with some Oracle Fusion Middleware components (for example, Enterprise Manager).

For more information using the CLI, see Chapter 3.

2.3 Creating Schemas

This section contains the following:

2.3.1 Creating Schemas as a User with Full SYS or SYSDBA Privileges

If you are a user with full SYS or SYSDBA privileges, and are able to provide valid authentication credentials for database access, follow the instructions in Table 2-1 to create schemas.

Click on the screen name to see more detailed information for that screen. Unless otherwise noted, click Next to continue to the next screen.

Table 2-1 Schema Creation Steps for Full-Privilege Users

Screen Description

Welcome

This screen introduces you to RCU. You can choose to skip this screen each time you start RCU by selecting Skip This Page Next Time.

Create Repository

Select Create Repository, then select System Load and Product Load.

If you do not have full SYS or SYSDBA privileges on the database, select Prepare Scripts for System Load and follow the schema creation instructions in Section 2.3.2.

Database Connection Details

Specify your database connection credentials.

Remember that if you are creating schemas on an IBM DB2 database, you must have already created one operating system user for each schema you want to create. See Section 1.1.4 for more information.

Click Next when you have specified your credentials. A separate dialog window will appear while RCU checks connectivity and some database prerequisites. When the database checking has passed without errors, click OK to dismiss the dialog window and go to the next screen.

Select Components (for Create Operation)

Select the components for which you want to create schemas, and specify a prefix to group them together.

You must remember the prefix and schema names for the components you are installing; you will need this information during the configuration phase of your product installation. Oracle recommends that you write these values down.

Schema Passwords

Specify the passwords for your schema owners.

You must remember the passwords you enter on this screen; you will need this information during the configuration phase of your product installation. Oracle recommends that you write these values down.

Map Tablespaces

Use this screen to configure the desired tablespace mapping for the schemas you want to create.

When you click Next, a separate dialog window will appear asking you to confirm that you want to create these tablespaces. Click OK to proceed and dismiss the dialog window.

A second dialog window will appear showing the progress of tablespace creation. After this is complete, click OK to dismiss this window and go to the next screen.

Summary (for Create Operation)

Verify the information on this screen, then click Create to begin schema creation.

Completion Summary (for Create Operation)

Review the information on this screen to verify that the operation was completed successfully. Click Close to complete the schema creation and dismiss RCU.


2.3.2 Creating Schemas as a User With Limited Database Privileges

If you are a user without SYS or SYSDBA privileges, or you are unable to provide valid authentication credentials for database access, follow the instructions in Table 2-2 to create schemas.

Table 2-2 Schema Creation Steps for Limited-Privilege Users

Screen Description

Welcome

This screen introduces you to RCU. You can choose to skip this screen each time you start RCU by selecting Skip This Page Next Time.

Create Repository

Select Create Repository, then select Prepare Scripts for System Load.

See Section 1.2.1 for more information about these operations.

Database Connection Details

Specify your database connection credentials.

Click Next when you have specified your credentials. A separate dialog window will appear while RCU checks connectivity and some database prerequisites. When the database checking has passed without errors, click OK to dismiss the dialog window and go to the next screen.

NOTE: Performing system load and product load separately is only supported on Oracle or Oracle EBR databases.

Select Components (for Create Operation)

Select the components for which you want to create schemas, and specify a prefix to group them together.

You must remember the prefix and schema names for the components you are installing; you will need this information during the configuration phase of your product installation. Oracle recommends that you write these values down.

Map Tablespaces

Use this screen to configure the desired tablespace mapping for the schemas you want to create.

When you click Next, a separate dialog window will appear asking you to confirm that you want to create these tablespaces. Click OK to proceed and dismiss the dialog window.

A second dialog window will appear showing the progress of tablespace creation. After this is complete, click OK to dismiss this window and go to the next screen.

Summary (for Create Operation)

Verify the information on this screen, then click Generate to begin script generation.

By default, the scripts are located in the ORACLE_HOME/oracle_common/rcu/log/logdir.date_timestamp directory. If you want to specify a different location, click Browse and select a location on your system.

The names of the scripts generated are script_systemLoad.sql and script_postDataLoad.sql.

N/A

After the scripts are created, someone with SYS or SYSDBA privileges should execute the script:

  1. Login to SQL*Plus.

  2. Enter the following command to execute the script_systemLoad.sql script (replace the path to the script if you chose to save it in a custom location):

    @ORACLE_HOME/oracle_common/rcu/log/logdir.date_timestamp/script_systemLoad.sql
    
  3. While the script is running, the user will be prompted to set the schema password for each schema being created. Specify the passwords as prompted.

    You will be returned to your system prompt when the script has been executed.

N/A

After the script is executed, start RCU again and perform the product load phase to complete schema creation.

Welcome

This screen introduces you to RCU. You can choose to skip this screen each time you start RCU by selecting Skip This Page Next Time.

Create Repository

Select Create Repository, then select Perform Product Load.

See Section 1.2.1 for more information about these operations.

Database Connection Details

Specify your database connection credentials.

Click Next when you have specified your credentials. A separate dialog window will appear while RCU checks connectivity and some database prerequisites. When the database checking has passed without errors, click OK to dismiss the dialog window and go to the next screen.

Select Components (for Create Operation)

From the drop-down list, select the prefix you specified earlier in this procedure.

Then, select the components for which you want to perform the product load.

Schema Passwords

Specify the passwords for your schema owners.

You must remember the passwords you enter on this screen; you will need this information during the configuration phase of your product installation. Oracle recommends that you write these values down.

Summary (for Create Operation)

Verify the information on this screen, then click Create to begin schema creation.

Completion Summary (for Create Operation)

Review the information on this screen to verify that the operation was completed successfully. Click Close to complete the schema creation and dismiss RCU.


2.3.3 Verifying Schema Version Numbers

When the schemas are created in your database, RCU creates and maintains a table called schema_version_registry. This table contains schema information such as version number, component name and ID, date of creation and modification, and custom prefix.

To verify that the schemas are installed properly, run the following query after login in to SQL*Plus:

select comp_name, version from schema_version_registry;

The comp_name argument retrieves the name of the component, and version retrieves the version number. For example:

SQL> select comp_name, version from schema_version_registry;

COMP_NAME
--------------------------------------------------------------------------------
VERSION
------------------------------
Audit Service
12.1.2.0.0
 
Audit Servicei Append
12.1.2.0.0
 
Audit Service Viewer
12.1.2.0.0
 
 
COMP_NAME
--------------------------------------------------------------------------------
VERSION
------------------------------
Metadata Services
12.1.2.0.0
 
Oracle Platform Security Services
12.1.2.0.0
 
Service Table
12.1.2.0.0
 
 
COMP_NAME
--------------------------------------------------------------------------------
VERSION
------------------------------
Call Control
12.1.2.0.0
 
User Messaging Service
12.1.2.0.0
 
WebLogic Services
12.1.2.0.0
 
 
9 rows selected.

2.4 Dropping Schemas

To drop schemas from the database, start RCU (see Section 2.2), then follow the instructions in Table 2-3.

Click on the screen name to see more detailed information for that screen. Unless otherwise noted, click Next to continue to the next screen.

Table 2-3 RUC Screens and Description for Dropping Schemas

Screen Instructions and Action Required

Welcome

This screen introduces you to RCU. You can choose to skip this screen each time you start RCU by selecting Skip This Page Next Time.

Create Repository

Select Drop Repository.

Database Connection Details

Specify the connection details for your database, then click Next.

A separate dialog window will appear while RCU checks connectivity and some database prerequisites. When the database checking as passed without errors, click OK to dismiss the dialog window and go to the next screen.

Select Components (for Drop Operation)

Select the prefix and the schemas you want to drop, then click Next.

A separate dialog window will appear asking you to verify that you want to drop the selected schemas. Click OK to dismiss this window.

A second dialog window appears while RCU checks the prerequisites for the schemas you are dropping. After this is complete, click OK to dismiss this window and go to the next screen.

Summary (for Drop Operation)

Review the information on this screen, then click Drop to drop the schemas.

Completion Summary (for Drop Operation)

Note the location of the log files, then click Close to dismiss the screen.


2.4.1 Dropping Shared Tablespaces

Tablespaces that are shared among multiple schemas will not be dropped. For example, if you created both the Audit Services (for example, DEV_IAU) and Metadata Services (for example, DEV_MDS) schemas, both schemas would use the temporary tablespace DEV_IAS_TEMP (see Section A.8.1, "Default Tablespace Mappings").

If you then drop the DEV_IAU schema, the DEV_IAS_TEMP tablespace would not be dropped since it is also being used by the DEV_MDS schema.

2.4.2 Dropping Schemas and Deleting Datafiles (Windows Only)

If your database is running on a Windows operating system, and you are using RCU to drop schemas from that database, some components datafiles are not dropped. These datafiles are located in the oradata directory in the database Oracle home.

In the event you want to re-create the dropped schema, you must first manually delete the datafiles before re-creating the schema.