Sunday, January 27, 2013

Creating the Required Schemas for Oracle Fusion Middleware Using RCU

To create required schema for Oracle Fusion Middleware[1], you can use Repository Creation Utility (RCU)[2]. You can also use RCU to drop component schemas.  In this article, we will show you how to create schema for the component named OID and discuss the significance of schema prefix.

Repository Creation Utility


Repository Creation Utility (RCU) is a Java tool to create database schema for component schemas that are part of Oracle Fusion Middleware.  RCU is available only on 32-bit x86 Linux and 32-bit Microsoft Windows Operating System platforms. You can run RCU from these machines to connect to any certifed versions of Oracle, or Microsoft SQL Server database, in order to create the schemas required by Fusion Middleware components.

Preparations and Prerequisites


If you are creating schemas on an Oracle database, you must use a user with SYSDBA privileges such as SYS[3].

Here is the outline of instructions of creating new schemas:
  1. Start up your database instance (i.e., ATGOID)
  2. Start tns listener
  3. Download the RCU and unzip it
  4. Open the RCU by invoking rcu in the bin folder
  5. Create component schemas as shown in the next section


Steps


The following sequence takes place when a schema is created with RCU (note that highlighted portion is the option that we have chosen for our installation):
  1. Welcome
  2. Create Repository
    • Create
      • Create and load component schemas into a database
    • Drop
      • Remove component schemas from a database
  3. Database Connection Detail
    • See Figure 1
    • Make sure prerequisite step 1 &2 were executed first.  Otherwise, you will see the following messages:
      • Unable to connect to the database using the provided details.
        Please enter a valid hostname and port or check if the listener is up and running.
    • When you click on Next, Checking Prerequisites window will be displayed (see Figure 1)
      • Prior to the schema being created, RCU performs global and component level prerequisite checks to ensure that certain minimum requirements are met.
    • You may see warning such as:
      • The database you are connecting is with non-AL32UTF8 character set. Oracle strongly recommends using AL32UTF8 as the database character set.
  4. Select Components
    • See Figure 2
      • Select an existing Prefix
      • Create a new Prefix: (Leave it empty; see why in next section)
    • When you click on NExt, Checking Component Prerequisites window will be popped up
  5. Schema Password
    • Enter the passwords for the main and auxiliary schema users.
      • Use same passwords for all schemas
      • Use main schema pssswords for auxiliary schemas
      • Specify different passwords for all schemas
    • Component
      • Oracle Internet Directory (Owner: ODS)
      • Auxiliary Schema (Owner: ODSSM)
  6. Map Tablespaces
    • Choose tablespaces for selected components (Default)
  7. Summary
    • Database details
      • Host Name: myserver
      • Port: 1521
      • Service Name: ATGOID
      • Connected As: sys
      • Operation: Create
      • Prefix for (non-prefixable) Schema Owners : DEFAULT_PREFIX
      • Component
        • Name: Oracle Internet Directory
        • Schema Owner: ODS
        • Tablespace Name:
          • Default: OLTS_DEFAULT
          • Temp: IAS_TEMP
          • Additional:
            • OLTS_ATTRSTORE
            • OLTS_BATTRSTORE
            • OLTS_CT_STORE
            • OLTS_SVRMGSTORE
  8. Completion Summary
    • RCU Logfile: $ORACLE_BASE/logdir.2013-01-15_11-03/rcu.log
    • Component Log Directory: $ORACLE_BASE/logdir.2013-01-15_11-03
    • Status: Success

Schema Prefix


You can use RCU to create multiple schemas of each component using custom prefixes. The prefix is prepended to and separated from the schema name with an underscore (_) character, as shown below:
  • prefix_schemaname
However, the Oracle Internet Directory (ODS) component cannot be prepended with a custom prefix because there can only be one repository for this component per database.  That's why we said that leave the new prefix empty at step 4 above.

The default prefix used by RCU is DEV.  If DEV has already been used, then RCU will default to DEV1, then DEV2, and so on. Prefixes are used to create and organize logical groups of schemas. For example, you may want to create a test version of the Metadata Services (schema name MDS) called TEST_MDS.  Then, when are ready for your production version, you can create a second version of the schema called PROD_MDS. Both TEST_MDS and PROD_MDS may reside on the same or separate databases.

You are only allowed to use a prefix once per schema within a single database. For example, if you had a version of the Metadata Services schema called DEV_MDS, then you can not use the DEV prefix again to create another version of the Metadata Services schema (for example, DEV_MDS2).  If you want to create another version of the schema using the same prefix, you must first drop the existing schema and then create the schema again.

Finally, the mapping between the prefixes and schemas is maintained in schema_version_registry.


SQL> select comp_id,mrc_name from SCHEMA_VERSION_REGISTRY;
COMP_ID                        MRC_NAME                       
------------------------------ ------------------------------ 
OID                            DEFAULT_PREFIX                 
ORASDPM                        DEV                            
SOAINFRA                       DEV                            

3 rows selected

References


  1. Oracle Fusion Middleware Articles
  2. Repository Creation Utility Overview
  3. What’s the Difference between the SYS and SYSTEM Schemas?
  4. Using Custom Prefixes
  5. Oracle Identity and Access manager 11g for Administrators

2 comments:

Sam said...

If you use the same tablespace for all your rcu accounts, never use the delete option to drop an account. It will drop the tablespace as well.

Sam said...

If you use the same tablespace for all your rcu accounts, never use the delete option to drop an account. It will drop the tablespace as well.