2 Running Repository Creation Utility (RCU)

This chapter describes how to use RCU to create and drop schemas using both the graphical interface and command line interface.

The following topics are covered:

2.1 RCU System and Database Requirements

Before you begin using RCU, you should review the "Repository Creation Utility (RCU) Requirements" section in the Oracle Fusion Middleware System Requirements document:

http://www.oracle.com/technology/software/products/ias/files/fusion_requirements.htm

This section contains important information about your system and component-specific database requirements that should be met before you run RCU.

RCU can only be used with certain databases. For important database information, you should read the "Certified Databases" section in the Oracle Fusion Middleware System Requirement document.

2.2 Starting RCU

To start RCU, insert the RCU CD-ROM and start RCU from the rcuHome/bin (on UNIX operating systems) or rcuHome\bin (on Windows operating systems) directory:

On UNIX operating systems:

./rcu

On Windows operating systems:

rcu.bat

You can also download a .zip file containing RCU from Oracle Technology Network (OTN):

http://www.oracle.com/technology/software/products/middleware/htdocs/111110_fmw.html

After downloading the .zip file, extract the contents to a directory of your choice, and run RCU from the RCU_HOME/bin (on UNIX operating systems) or RCU_HOME\bin (on Windows operating systems) directory with the commands shown above, where RCU_HOME is the folder where RCU was unzipped, or the drive or mount point of the CD-ROM.

Note:

On Windows systems, make sure that you do not extract the RCU .zip file to a directory name containing spaces.

Note:

RCU is available only on Linux and Windows platforms. Either the Linux RCU or Windows RCU may be used to create schemas on any supported database platform.

2.3 Using RCU with Java Access Bridge (Windows Only)

Java Access Bridge enables assistive technologies, such as JAWS screen reader, to read Java applications running on the Windows platform. Assistive technologies can read Java-based interfaces, such as Oracle Universal Installer and Oracle Enterprise Manager.

2.3.1 Install Java Access Bridge

To install Java Access Bridge:

  1. Download Java Access Bridge from the following URL:

    http://java.sun.com/javase/technologies/accessibility/accessbridge/
    
  2. Install Java Access Bridge.

  3. Copy the access-bridge.jar and jaccess-1_4.jar from your installation location to the jre\lib\ext directory.

  4. Copy the WindowsAccessBridge.dll, JavaAccessBridge.dll, and JAWTAccessBridge.dll files from your installation location to the jre\bin directory.

  5. Copy the accessibility.properties file to the jre\lib directory.

2.3.2 Configure RCU to Use Java Access Bridge

To configure RCU to use Java Access Bridge after you complete the installation, set the system variable ORACLE_OEM_CLASSPATH to point to the installed Java Access Bridge files:

  1. Display System in the Control Panel.

  2. Select the Advanced tab.

  3. Click the New button under the System Variable list. The New System Variable dialog appears.

  4. In the Variable Name field, enter ORACLE_OEM_CLASSPATH.

  5. In the Variable Value field, enter the full path to access-bridge.jar and jaccess-1_4.jar.

    Use a semicolon to separate the two paths. Do not use quotes or character spaces.

  6. Click OK.

2.4 Creating Schemas

RCU is used to create the various component schemas in an existing database.

2.4.1 Do all Schemas Have to Reside in the Same Database?

You can choose to create all the schemas in a single database or distribute them throughout multiple databases.

2.4.2 Are Multiple Schemas Supported?

You can use RCU to create multiple schemas of each component using custom prefixes (for example, you could use the prefix TEST to create a test version of the Metadata Services schema called TEST_MDS, then use the prefix PROD to create a production version of the same schema called PROD_MDS on the same database).

Note:

The Oracle Internet Directory (ODS) component cannot be prepended with a custom prefix; there can only be one repository for this component per database.

You are only allowed to use a prefix once per schema within a single database. For example, if you had a test version of the Metadata Services schema called DEV_MDS, then you can not use the DEV prefix again to create another version of the schema (for example, DEV_MDS2).

2.4.3 What Happens When a Schema is Created?

The following sequence takes place when a schema is created with RCU:

  1. Prior to the schema being created, RCU performs global and component level prerequisite checks to ensure that certain minimum requirements are met.

  2. The schemas are created; the required tablespaces and data files are created.

  3. The schema_version_registry table is updated so that the schema type is mapped to the actual schema name (for example, TEST_MDS might be mapped to the MDS Schema type).

  4. The scripts provided by the various component owners are invoked; these scripts perform the following:

    1. Create the user and grant the required roles.

    2. Run ALTER SESSION SET CURRENT SCHEMA to switch the schema to user context.

    3. Create the schema objects.

2.4.4 Creating Schemas

After successfully starting RCU (see Section 2.2, "Starting RCU"), 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 How to Create Schemas

No. RCU Screen Instructions and Action Required

1

Welcome Screen

None.

2

Create Repository Screen

Select Create.

3

Database Connection Details Screen

Specify the connection details for your database.

4

Select Components Screen (for Create Operation)

Specify a schema prefix and select the components for which you want to create schemas in the database.

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

5

Schema Passwords Screen

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 Fusion Middleware product installation. Oracle recommends that you write these values down.

6

Map Tablespaces Screen

Configure the desired tablespace mapping for the schemas you want to create.

7

Summary Screen (for Create Operation)

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

8

Completion Summary Screen (for Create Operation)

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


2.5 Dropping Schemas

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

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-2 How to Drop Schemas

No. Screen Instructions and Action Required

1

Welcome Screen

None.

2

Create Repository Screen

Select Drop.

3

Database Connection Details Screen

Specify the connection details for your database.

4

Select Components Screen (for Drop Operation)

Select the prefix and the schemas you want to drop.

5

Summary Screen (for Drop Operation)

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

6

Completion Summary Screen (for Drop Operation)

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


2.5.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.5.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 (for example, OID).

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

2.6 Creating the Portal Demo Schema

The Oracle Portal repository includes a demo schema (portal_schema_user_name_DEMO) that can not be installed using RCU. If you want to install this schema for testing purposes, you must do so using the instdemo.sql script:

> sqlplus /nolog
SQL> connect sys as sysdba
SQL> @instdemo.sql portal_schema_user_name
                   portal_schema_user_password
                   default_tablespace
                   temporary_table_space
                   name_of_the_demo_schema_user
                   password_of_the_demo_schema_user
                   name_of_the_log_file
                   database_connection_string

For example:

SQL> @instdemo.sql portal portalpassword portal ias_temp portal_demo portaldemopassword example_app.log (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=db.example.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))

2.7 Using the Repository Creation Utility CLI

This section describes how to use the Repository Creation Utility's (RCU) command line interface (CLI). The 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 section contains the following topics:

2.7.1 CLI Syntax and Parameters

The syntax for the RCU command line interface is:

rcu [-silent | -interactive] [-createRepository | -dropRepository] {<options>}

Specify -silent if you want to run RCU with minimal interaction once you have entered the commend. You must specify all necessary command line parameters. If you use the -silent option, RCU will prompt you for the database and schema passwords.

Specify -interactive if you want to run RCU and be prompted for each parameter.

Use the -createRepository command to create a repository. For more information, see Section 2.7.4, "Creating a Repository".

Use the -dropRepository command to drop a repository. For more information, see Section 2.7.5, "Dropping a Repository"

Table 2-3 describes the various options and their descriptions.

Table 2-3 RCU Command Line Interface Options and Descriptions

Option Description

-compInfoXMLLocation

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

-storageXMLLocation

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

-databaseType

Type of database to which you are connecting. Valid options are ORACLE, IBMDB2, or SQLSERVER.

-connectString

Credentials for connecting to your database.

  • Oracle databases: use the format host:port:sid.

  • Microsoft SQL Server databases: use the format server name or host:port:database name.

-dbUser

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

-dbRole

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

-unicodeSupport

Whether or not your database creates schemas that support encodings. Valid values are Yes or No. The default value is Yes. This parameter is valid for the SQLSERVER database type only.

-variables

Comma separated variables in the format variablename=value. See Section 2.7.6, "RCU Environment Variables" for a list of RCU environment variables.

-schemaPrefix

Prefix for your schemas. For more information about schema prefixes, refer to Section 2.4.2, "Are Multiple Schemas Supported?" and Section A.5, "Select Components Screen (for Create Operation)".

Some schemas do not take prefixes; see Section 2.4.2, "Are Multiple Schemas Supported?" for more information.

-component

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 Table 2-4 in Section 2.7.3, "RCU Component IDs and Schema Dependencies". Multiple components are sometimes necessary because of dependencies; for example, you cannot create the Oracle Portal (PORTAL) schema if the Portlet Producers (PORTLET) schemas does not already exist. In this case, you must specify both schemas:

-component PORTAL -component PORTLET

For more information about schemas and their dependencies, see Section 2.7.3, "RCU Component IDs and Schema Dependencies".


2.7.2 RCU and Password Handling

If you use the -silent flag, RCU will prompt you for the database and schema passwords.

2.7.3 RCU Component IDs and Schema Dependencies

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.

Table 2-4 lists the schemas along with their component IDs and dependencies:

Table 2-4 Component IDs and Dependencies

Component Component ID Dependencies

AS Common Schemas

Metadata Services

MDS

None

Audit Services

IAU

None

Enterprise Scheduler Service

ORAESS

None

Identity Management Schemas

Oracle Internet Directory

OID

None

Oracle Identity Federation

OIF

None

Oracle Enterprise Content Management Suite Schemas

Oracle Information Rights Management

IRM

None

Oracle Imaging and Process Management

IPM

None

WebLogic Communication Services Schemas

Presence

ORASDPXDMS

Metadata Services (MDS)

SIP Infrastructure Subscriber Data Service (ORASDPSDS)

SIP Infrastructure Location Service (ORASDPLS)

User Messaging Service (ORASDPM)

SIP Infrastructure Subscriber Data Service

ORASDPSDS

Metadata Services (MDS)

SIP Infrastructure Location Service (ORASDPLS)

SIP Infrastructure Location Service

ORASDPLS

Metadata Services (MDS)

SIP Infrastructure Subscriber Data Service (ORASDPSDS)

SOA and BPM Infrastructure Schemas

SOA Infrastructure

SOAINFRA

Metadata Services (MDS)

User Messaging Service (ORASDPM)

Business Activity Monitoring

BAM

Metadata Services (MDS)

User Messaging Service (ORASDPM)

User Messaging

ORASDPM

Metadata Services (MDS)

WebCenter Suite Schemas

Portlet Producers

PORTLET

None

WebCenter Spaces

WEBCENTER

Metadata Services (MDS)

Oracle Content Server 10g

CONTENTSERVER

None

Discussions

DISCUSSIONS

None

Discussions Crawler

DISCUSSIONS_CRAWLER

Discussions (DISCUSSIONS)

Wiki and Blog

WIKI

None

Portal and Business Intelligence Schemas

Discoverer

DISCOVERER

None

Portal

PORTAL

Portlet Producers (PORTLET)


In addition to the component IDs listed in the table, there is also a SAMPLE schema that can be used for testing purposes.

You must also be aware of these dependencies when dropping schemas. For example, if you can see from Table 2-4 that 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.

2.7.4 Creating a Repository

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

rcu [-silent | -interactive] -createRepository
   [-compInfoXMLLocation <location of ComponentInfo.xml file>]
   [-storageXMLLocation <location of Storage.xml file>]
   [-databaseType [ORACLE|SQLSERVER]]
   -connectString <database connect string (for example: host:port:service_id)>
   -dbUser <database username>
   [-dbRole <database role>]
   [-unicodeSupport Yes|No (default is Yes. Applicable for SQLSERVER databases only.)]
   [-variables <comma separated variables in the format: variablename=value>]
   [-schemaPrefix <schema prefix (optional for non-prefixable components)>]
   -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.

When specifying the -component, you must use the correct component IDs, which are listed in Table A-1 in Section A.8.1, "Default Tablespace Mappings".

Below is a sample command to create the SOA Infrastructure schemas on a UNIX system:

./rcu -silent -createRepository -databaseType ORACLE -connectString host1.oracle.com:1521:orcl -dbUser sys -dbRole sysdba -schemaPrefix TEST -component SOAINFRA -component MDS -component ORASDPM

Notice that this command takes into account the correct component IDs and dependencies for the SOA Infrastructure schemas, as listed in Table 2-4.

2.7.5 Dropping a Repository

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

rcu [-silent | -interactive] -dropRepository
   [-compInfoXMLLocation <location of ComponentInfo.xml file>]
   [-storageXMLLocation <location of Storage.xml file>]
   [-databaseType [ORACLE|SQLSERVER]]
   -connectString <database connect string (for example: host:port:service_id)>
   -dbUser <database username>
   [-dbRole <database role>]
   [-variables <comma separated variables in the format: variablename=value>]
   [-schemaPrefix <schema prefix (optional for non-prefixable components)>]
   -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.

Below is a sample command to drop the WebCenter Spaces schemas on a UNIX system:

./rcu -silent -dropRepository -databaseType ORACLE -connectString host1.oracle.com:1521:orcl -dbUser sys -dbRole sysdba -schemaPrefix TEST -component WEBCENTER

2.7.6 RCU Environment Variables

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

Table 2-5 RCU Environment Variables

Variable Default Description

RCU_LOG_LOCATION

RCU_HOME/rcu/log (UNIX operating systems)

RCU_HOME\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.