Skip to content

Personal tools
You are here: Home » 10g » Oracle10g Articles » Oracle Application Server 10g: Creating the Metadata Repository in an Existing Oracle Database
Who Are You?
I am a:
Mainframe True Believer
Distributed Fast-tracker

[ Results | Polls ]
Votes : 3548

Oracle Application Server 10g: Creating the Metadata Repository in an Existing Oracle Database

by John Garmany

When you install the Oracle Application Server 10g at any level above the J2EE installation, you need a to have a Metadata Repository to maintain configuration detail and identity management. This repository supports the Infrastructure instance and the Oracle Internet Directory. This is where the Infrastructure maintains clustering and configuration information. Normally, the Oracle Universal Installer (OUI) will create a customized 9iR1 database to hold this repository. However, there are times when you may want to place this repository in an existing database. With Oracle Application Server 10g, this is now possible.

There are two basic reasons why you would want to use an existing database to hold the Metadata Repository: availability and manageability.


One of the problem areas in creating a system that does not contain a component that is a single point of failure is the Infrastructure instance. All the Middle Tier instances can be clustered to hide the failure of one instance in the cluster. By using Islands within containers, object states can be replicated between containers and instances, allowing another instance to pick up a user from a failed instance and continue functioning without the user realizing that the system experienced a failure. The one instance that cannot be clustered is the Infrastructure instance, although Oracle has promised that this will be a feature in future releases. Since the Infrastructure instance cannot be clustered, you must instead use other methods of ensuring that the Infrastructure remains available. In the case of the Metadata Repository, you have all the high-availability options that are built into the Oracle9iR1 database to include Data Guard and Replication. With the Oracle Application Server 10g, you also have the ability to place the Metadata Repository into an existing Real Application Clusters (RAC) database. With RAC, there are multiple instances supporting one database. The failure of one instance will cause the users (in this case the Infrastructure instance) to automatically fail over to another instance. RAC is Oracle’s premier high-availability option, and Oracle Application Server 10g will now let you take advantage of that capability to host the Metadata Repository.


The Oracle Database provides a number of high-availability options and you may have already implemented them in your back-end database. By installing the Metadata Repository in the back-end database, the Metadata Repository can now take advantage of those capabilities. Options like Oracle Replication can allow you to create multiple instances of components like Oracle Internet Directory, which can share the same replicated data. Replication also allows you to locate copies of the data at distant locations, improving response time. Using it for the Metadata Repository will save you from having to manage two replicated databases.

You would also be surprised at the number of installations of the Oracle Application Server 10g that are all installed on one server. The back-end Oracle Database, the Infrastructure database, and both the Infrastructure and Middle Tier instances are all on one server with limited resources. These are production systems supporting client applications using Forms and Portal. The ability to place the Metadata Repository in the back-end database relieves the server of having to support a separate database, saving both memory and processor resources.

This solution, however, is not desirable for all situations. The repository supports the application server’s OID instance, which is used to validate and authenticate uses through single sign-on. High activity on the back-end database could adversely affect the performance of OID. Likewise, when installing the repository in a RAC environment, you should limit the number of instances that support the repository to keep the repository data in a minimum number of instance caches.

Oracle Application Server Repository Creation Assistant

The Oracle Application Server Repository Creation Assistant option is only available with the Oracle Application Server 10g; the back-end database, however, can be Oracle 9iR1 or Oracle 9iR2. You must also create the Metadata Repository in the existing database before installing the Infrastructure instance.

Installing the Metadata Repository in an existing database is a multi-step process. First, you must ensure that the database meets the minimum requirements to hold the Metadata Repository and that it contains the necessary packages. Next, you must run the Oracle Application Server Repository Creation Assistant to create the Metadata Repository. Finally, you can install the Infrastructure instance, using the pre-created repository.

The Oracle Application Server Repository Creation Assistant is found on the Utilities CDROM or in the repca_utilities directory of the installation DVD; the program is called runRepca. The runRepca utility is actually quite flexible and can install the Metadata Repository into an Oracle databases that implement RAW devices, Real Application Clusters, Automatic Storage Management (10g) and Oracle-Managed Files.

As an example, I am going to walk you through installing the Metadata Repository into an existing Oracle 9iR2 database. Regardless of what the Oracle documentation states, the runRepca assistant will not currently load the Metadata Repository into an Oracle 10g database. RunRepca looks for specific 9i database files in the $ORACLE_HOME/bin directory that it will not find in a 10g database.

The steps to follow are:

      • Verify Requirements of the Existing Database.
      • Install the Repository using runRepca.
      • Install the Infrastructure Instance.

We are going to focus on the first two steps. Before starting, you need to ensure that the back-end database meets the minimum requirements to support the Repository. There are no special operating system requirement beyond those required by the database or the application server.

The Back-end Database

Before starting, be sure that your database meets some minimum requirements and has been patched to the appropriate level. This means that at a minimum you are starting with one of the following:

      • Oracle9iR1 at or later
      • Oracle9iR2 at or later
      • Oracle 10g (note that this did not work in testing!)

You can verify your current database version by querying v$version.

SQL> select * from v$version;

Oracle9i Enterprise Edition Release - Production

The location of the repository data files must have at least 1.15Gb of free space, and the SYSTEM tablespace must have 500Mb of available space.

Initialization Parameters

Most of the following parameters are checked by the assistant and it will refuse to run if they do not meet the minimum settings:

8192 or greater                Requires that the database be recreated to change. If less than 8k, the database cannot be used for the Metadata Repository.                                
1 or greater  
300 or greater  
1 or greater  
Between 144Mb and 2Gb  
Between 144Mb and 2Gb  
Between 64Mb and 2Gb  
Between 96Mb and 2Gb  
true  This parameter must remain true after installation if you use Oracle Wireless.
trusted or enforced This parameter must remain true after installation if you use Oracle Wireless.
400 or greater  
99 or lower  
compatibility or higher  

All the previous parameters can be changed after the Metadata Repository installation except the two query_rewrite parameters, which are required by Oracle Wireless. You can set many of these parameters dynamically on the instance before running runRepca, then change them back after the installation completes.

If you are using Oracle Managed Files you must set db_create_file_directory to the location that you want runRepca to create the repository datafiles.

db_create_file_dest  file directory   

Required Packages

The following packages must be installed. All are installed normally in a 9i or 10g database:


If you patched your database to, you will need to reload the DBMS_LDAP package, logged on as internal.

# cd $ORACLE_HOME\rdbms\admin
# sqlplus “/ as sysdba”
SQL> @catldap.sql

Finally, runRepca requires that the database use password file authentication. If needed, create a password file using the orapwd utility and set the remote_login_password parameter to “exclusive” or “shared.”

At this point we are ready to execute the runRepca utility.

Running runRepca

When you start runRepca, you can pass it parameters; note that it will ask for parameters if you don’t pass them. The program will start by asking you to input the ORACLE_HOME for the database that will maintain the repository. It will then ask you if the database uses RAW devices and if it is a RAC cluster. If not, answer “N.” Next, the actual assistant will start.

After the splash screen, you will be asked for the SYS password, the host name, and port for the database and the database service name. The assistant will then go through a process of validating that the database is the correct version and has the correct parameters set.

Once the database is accepted, runRepca checks to ensure that none of the repository tablespaces are already defined (refer to figure 1). If any are defined, runRepca will notify you and allow you to either quit or let the assistant drop and recreate them.

Figure 1.

You are then asked whether you are using ASSM or not. I was not, and so the next screen asked if I wanted to define a directory for the files or use Oracle-Managed files. I defined a directory for my datafiles (refer to figure 2). In the next step, you are asked whether you want to register with an Oracle Internet Directory (OID). Since I have not installed the OID yet, I chose to skip that step. The assistant then began loading the repository (refer to figure 3), which may take some time (mine took 48 minutes).

Figure 2.

Figure 3.

Once the repository has been successfully installed, you will need to unlock the user DCM and set the password. You will also need to update the sqlnet.ora file for the database adding LDAP to the names parameters.


Now you are ready to install the Application Server 10g Infrastructure instance using the back-end database as the Metadata Repository.

Again, using the back-end database for the Infrastructure’s Metadata Repository allows you to better manage and maintain your overall system. By eliminating the extra database normally used, you will be able to incorporate the Metadata Repository into high-availability solutions implemented into the back-end database.

Special for readers: “Inside the Oracle App Server Infrastructure Repository,” from the new book, Oracle Application Server 10g Administration Handbook, by John Garmany and Don Burleson.


John Garmany is a senior DBA with Burleson Consulting. John is a graduate of West Point, an Airborne Ranger and a retired Lt. Colonel with 20+ years of IT experience. John is an OCP Certified Oracle DBA with a Master's Degree in Information Systems, a Graduate Certificate in Software Engineering, and a BS degree (Electrical Engineering) from West Point. A respected Oracle expert and author, John serves as a writer for Oracle Internals, DBAzine, and John is the author of Logical Database Design — Principles & Practices, CRC Press; the Oracle Database 10g Application Server Administration Handbook, Oracle Press; and Oracle Replication — Snapshot, Multi-master & Materialized Views Scripts and Oracle SQL*Plus Reports — Fast reporting with SQL and SQL*Plus, Rampant TechPress. John can be reached at

Contributors : John Garmany
Last modified 2005-06-22 12:12 AM
Transaction Management
Reduce downtime and increase repeat sales by improving end-user experience.
Free White Paper
Database Recovery
Feeling the increased demands on data protection and storage requirements?
Download Free Report!

Powered by Plone