Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 






                    The Best Oracle Resource on the Web

Oracle Application Server 10
g: 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 surprise 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 you 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:

db_block_size 8192 or greater Requires that the database be recreated to change. If less than 8k, the database cannot be used for the Metadata Repository.
aq_tm_processes 1 or greater  
open_cursors 300 or greater  
job_queue_processes 1 or greater  
db_cache_size Between 144Mb and 2Gb  
shared_pool_size Between 144Mb and 2Gb  
java_pool_size Between 64Mb and 2Gb  
pga_aggregate_target Between 96Mb and 2Gb  
query_rewrite_enabled true This parameter must remain true after installation if you use Oracle Wireless.
query_rewrite_integrity trusted or enforced This parameter must remain true after installation if you use Oracle Wireless.
sessions 400 or greater  
undo_management auto  
nls_length_semantics byte  
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.




Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.