Skip Headers
Oracle® Application Server Administrator's Guide
10g Release 2 (10.1.2)
B13995-06
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

9 Changing Infrastructure Services

This chapter provides procedures for changing the Infrastructure Services used by a middle-tier instance.

It contains the following topics:

9.1 Overview of Procedures for Changing Infrastructure Services

Most middle-tier instances use Infrastructure Services, such as Identity Management Services and the Metadata Repository. These services are usually assigned during installation.

After installation, you may want to change the Infrastructure Services used by a middle-tier instance. For example, you may want to use an Identity Management Service on a different host. Or, you may want to use a different Metadata Repository.

You can change Infrastructure Services using the Infrastructure page on the Application Server Control Console, shown in Figure 9-1. Notice that you can change the Identity Management or the Metadata Repository used by a middle-tier instance.

Figure 9-1 Application Server Control Console Infrastructure Page

Application Server Control Console Infrastructure Page
Description of "Figure 9-1 Application Server Control Console Infrastructure Page"

You must change Infrastructure Services when you change any of the following:

If you have disabled anonymous binds in Oracle Internet Directory, you must enable them before you make configuration changes. See Section 7.6, "Disabling and Enabling Anonymous Binds" for more information.

Note that if you change between a File-Based farm and a Database-based farm, you must restart Application Server Control Console, using the emctl command, to see the change reflected in the console.

You cannot simply use the wizard to change from one Infrastructure service to another. You must first perform manual tasks to create and prepare the new Infrastructure service. This chapter describes the following supported procedures for changing Infrastructure Services:

9.2 Changing the Oracle Internet Directory or Oracle HTTP Server Ports on Identity Management

To change the Oracle Internet Directory non-SSL or SSL port on an Identity Management installation, refer to Section 4.4.2, "Changing Oracle Internet Directory Ports".

To change the Oracle HTTP Server non-SSL or SSL Listen port on an Identity Management installation, which effectively changes the OracleAS Single Sign-On port, refer to Section 4.4.3, "Changing the HTTP Server Port on an Identity Management Installation".

9.3 Changing Oracle Internet Directory from Dual Mode to SSL Mode

When you install Identity Management, you are asked to choose a mode for Oracle Internet Directory. The default mode is dual mode, which allows some components to access Oracle Internet Directory using non-SSL connections. During the installation, you can choose SSL mode, which specifies that all components must use SSL when connecting to the directory.

If you did not choose SSL mode during the installation, and want to change to SSL mode after installation, follow the procedure in this section. It includes changing the mode of the Oracle Internet Directory, and updating middle-tier instances to use the new mode.

9.3.1 Procedure

To change Oracle Internet Directory to SSL mode, perform the following tasks:

Task 1: Stop Middle-Tier Instances

Stop all middle-tier instances that use Oracle Internet Directory. Using the Application Server Control Console, navigate to the Home page for each middle-tier instance and click Stop All. Be sure to leave Application Server Control running.

Task 2: Change the Oracle Internet Directory Mode

Perform this task on the Infrastructure that contains Oracle Internet Directory.

  1. Create a file named mod.ldif and enter the following lines in the file:

    dn:cn=configset0,cn=osdldapd,cn=subconfigsubentry
    changetype:modify
    replace:orclsslenable
    orclsslenable:1
    
    
  2. Run the following command:

    ldapmodify -D cn=orcladmin -w orcladmin_passwd -p oid_port -v -f mod.ldif
    
    

    In the example, oid_port is the non-SSL Oracle Internet Directory port. This is listed as OIDport in ORACLE_HOME/config/ias.properties.

    Note that if you are using OracleAS Cold Failover Cluster, you must use the following command:

    ldapmodify -D cn=orcladmin -w orcladmin_passwd -h virtual_hostname
    -p oid_port -v -f mod.ldif
    
    

    In the example, virtual_hostname is the virtual hostname of the OracleAS Cold Failover Cluster.

  3. Stop the entire instance that contains Oracle Internet Directory:

    • On UNIX systems:

      ORACLE_HOME/bin/emctl stop iasconsole
      ORACLE_HOME/opmn/bin/opmnctl stopall
      
      
    • On Windows systems:

      ORACLE_HOME\bin\emctl stop iasconsole
      ORACLE_HOME\opmn\bin\opmnctl stopall
      
      
  4. Edit the following file:

    (UNIX) ORACLE_HOME/ldap/admin/ldap.ora
    (Windows) ORACLE_HOME\ldap\admin\ldap.ora
    
    
    1. Modify the following line to remove the non-SSL port number:

      DIRECTORY_SERVERS=(myhost.myco.com::sslport)
      
      
    2. Save and close the file.

  5. If the OracleAS Metadata Repository was created using OracleAS Metadata Repository Creation Assistant, take the following steps:

    1. Copy the ldap.ora file from the Identity Management Oracle home to the Oracle home for the OracleAS Metadata Repository. For example, for 10g Release 2 (10.1.2), the location is:

      (UNIX) Oracle_Home/ldap/admin
      (Windows) Oracle_Home\ldap\admin
      
      
    2. Edit the sqlnet.ora file that is located in the following location in the Oracle home for the OracleAS Metadata Repository:

      (UNIX) Oracle_Home/network/admin
      (Windows) Oracle_Home\network\admin
      
      

      Add LDAP to the NAMES.DIRECTORY_PATH entry, as shown in the following example:

      NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, ONAMES, HOSTNAME)
      
      
  6. Edit the following file:

    (UNIX) ORACLE_HOME/config/ias.properties
    (Windows) ORACLE_HOME\config\ias.properties
    
    
    1. Change the SSLOnly parameter as follows:

      SSLOnly=true
      
      
    2. Save and close the file.

  7. Start the entire instance that contains Oracle Internet Directory:

    • On UNIX systems:

      ORACLE_HOME/opmn/bin/opmnctl startall
      ORACLE_HOME/bin/emctl start iasconsole
      
      
    • On Windows systems:

      ORACLE_HOME\opmn\bin\opmnctl startall
      ORACLE_HOME\bin\emctl start iasconsole
      

Task 3: Change Middle-Tier Instances to Use SSL Mode

In each middle-tier instance, run the Change Identity Management wizard and restart the instance:

  1. Using the Application Server Control Console, navigate to the Home page for the middle-tier instance.

  2. Click Infrastructure.

  3. On the Infrastructure Page, in the Identity Management section, click Change.

  4. On the Internet Directory page:

    • Host: Enter the fully-qualified name of the Oracle Internet Directory host.

    • Port: Enter the SSL Oracle Internet Directory port number.

    • Use only SSL connections with Internet Directory: Check this box.

    Click Next.

  5. On the Login page:

    • User Name: Enter cn=orcladmin, or the distinguished name of a user in the iASAdmins group.

    • Password: Enter the password for the user.

    Click Next.

  6. On the Validation page, you will receive informational messages regarding the validation of this operation. If you receive any error message, follow the instructions for investigating them. Otherwise, if the operation is valid, click Finish.

  7. When the operation is finished, start the components in the middle-tier instance:

    1. Click Home to navigate to the Home page for the instance.

    2. Click Start All.


      Note:

      Now that you have disabled the non-SSL Oracle Internet Directory port, you must provide the "-U 1" option when using LDAP command-line utilities (such as ldapsearch, ldapmodify, and ldapaddmt) to connect to the SSL port.

9.4 Moving Identity Management to a New Host

This section provides a procedure for moving Identity Management to a new host. This procedure involves creating a replica (or copy) of the original Identity Management on a different host, along with its own new Metadata Repository, and then changing the middle-tier instance to use the new Identity Management.

9.4.1 Sample Uses for This Procedure

The following are sample uses for this procedure:

  • You have an existing Identity Management and associated Metadata Repository that is used by one or more middle-tier instances. Your organization intends to replace the current Identity Management host with a new system. You can use this procedure to create a replica of the Identity Management, along with its own Metadata Repository, and change the middle-tier instances to use the new Identity Management. You can then retire the original host.

  • You want to create a failover environment for your Identity Management. You can use this procedure to create a replica of the current Identity Management, along with its own Metadata Repository. You can keep the replica running so it stays synchronized with the original Identity Management. You can perform regular exports of data in the original Metadata Repository and save them. In the event that you lose the original Identity Management, you can import the data to the new Metadata Repository, and change the middle-tier instances to use the new Identity Management. Refer to Section 9.4.4, "Strategy for Performing Failover with This Procedure" for more information.

9.4.2 Assumptions and Restrictions

  • For both the original and new installations, the Identity Management and Metadata Repository can exist in the same Oracle home, or in separate Oracle homes (same or different host). If they are in separate Oracle homes, perform the operations on each in their own Oracle home.

  • For both the original and new installations, the Identity Management components (OracleAS Single Sign-On, Oracle Internet Directory, Delegated Administration Services, Directory Integration and Provisioning) may exist in the same Oracle home, or may exist in separate Oracle homes (same or different host). If they exist in separate Oracle homes, perform the operations on each in their own Oracle home.

  • The Metadata Repository used by middle-tier instances for product metadata is not affected by this procedure.

    • If the middle-tier instances use product metadata in the same Metadata Repository that the original Identity Management uses, they will continue to use that Metadata Repository after you have changed them to the new Identity Management. If you want, you can change them to use a different Metadata Repository after you have finished moving Identity Management. Refer to Section 9.5, "Changing the Metadata Repository Used by a Middle-Tier Instance".

    • If the middle-tier instances use a separate Metadata Repository for product metadata, they will continue to use that Metadata Repository after you have changed them to the new Identity Management.

  • This procedure does not take OracleAS Certificate Authority into consideration.


    See Also:

    Oracle Application Server Certificate Authority Administrator's Guide for information on updating OracleAS Certificate Authority when changing Identity Management services

9.4.3 Procedure

An overview of the procedure is as follows:

  1. You have an original Identity Management (also called the Master) used by one or more middle-tier instances. The Identity Management has a Metadata Repository. You install and set up a new Identity Management (also called the Replica). This Identity Management has its own Metadata Repository. The Oracle Internet Directory in the new Identity Management is an LDAP-based replica of the original Oracle Internet Directory. Replication takes place constantly from the original Oracle Internet Directory to the new Oracle Internet Directory.

    Figure 9-2 shows a sample of this setup.

    Figure 9-2 Original Host (Master) and New Host (Replica)

    Original Host (Master) and New Host (Replica)
    Description of "Figure 9-2 Original Host (Master) and New Host (Replica)"

  2. You perform the following tasks to change to the new Identity Management. The tasks are shown in Figure 9-3.

    • 1: Migrate OracleAS Single Sign-On and Directory Integration and Provisioning data from the original Metadata Repository (Master) to the new Metadata Repository (Replica).

    • 2: Change the middle-tier instances to use the new Metadata Repository.

    • 3: Stop the LDAP-based replication.

    Figure 9-3 Changing from Original to New Identity Management

    Changing from Original to New Identity Management
    Description of "Figure 9-3 Changing from Original to New Identity Management"

To change to the new Oracle Internet Directory, perform the following tasks:

Task 1: Install and Set Up the New Identity Management and Metadata Repository

In this task, you install and set up the new Identity Management and its associated Metadata Repository. The new Identity Management is an LDAP-based replica of the original Identity Management.

  1. Read Section H.1, "About LDAP-Based Replicas" to learn about LDAP-based replicas and how they are used for this procedure.

  2. Follow the procedure in Section H.2, "Installing and Setting Up an LDAP-Based Replica" to install and set up the new Identity Management and Metadata Repository.

Task 2: Migrate OracleAS Single Sign-On and Directory Integration and Provisioning Data

In this task, you migrate the OracleAS Single Sign-On and Directory Integration and Provisioning Data from the original Metadata Repository to the new Metadata Repository. The source for the migration is the original Metadata Repository (Master) and the target for the migration is the new Metadata Repository (Replica).

This task contains the following subtasks:

Migrate the OracleAS Single Sign-On Data 

To migrate the OracleAS Single Sign-On data:

  1. Obtain the ORASSO schema password on the master:

    MASTER_HOME/bin/ldapsearch -p master_oid_port -h 
    master_host -D "cn=orcladmin"
     -w master_orcladmin_passwd -b 
    "orclresourcename=orasso,  orclreferencename=master_global_db_name, 
    cn=ias infrastructure databases,
    cn=ias, cn=products, cn=oraclecontext" -s base "objectclass=*" orclpasswordattribute
    
    

    This command prints the ORASSO password in a line like the following:

    orclpasswordattribute=LAetjdQ5
    
    
  2. Export the OracleAS Single Sign-On data from the master, ensuring that the ORACLE_HOME environment variable is set before you run this command:

    MASTER_HOME/sso/bin/ssomig -export -s orasso -p
     master_orasso_passwd -c master_db_name -log_d $MASTER_HOME/sso/log
    
    

    In the example, master_orasso_passwd is the ORASSO password obtained in the previous step.

  3. Copy the ssomig.dmp and ssoconf.log files from the master to the replica, preserving the exact full path for each file:

    UNIX:
    cp MASTER_HOME/sso/log/ssomig.dmp REPLICA_HOME/sso/log/ssomig.dmp
    cp MASTER_HOME/sso/log/ssoconf.log REPLICA_HOME/sso/log/ssoconf.log
    
    Windows:
    copy MASTER_HOME\sso\log\ssomig.dmp REPLICA_HOME\sso\log\ssomig.dmp
    copy MASTER_HOME\sso\log\ssoconf.log REPLICA_HOME\sso\log\ssoconf.log
    
    
  4. Obtain the ORASSO schema password on the replica:

    REPLICA_HOME/bin/ldapsearch -p replica_oid_port -h replica_host -D
    "cn=orcladmin" -w replica_orcladmin_password -b "orclresourcename=orasso,
    orclreferencename=replica_global_db_name, cn=ias infrastructure databases,
    cn=ias, cn=products, cn=oraclecontext" -s base "objectclass=*"
    orclpasswordattribute
    
    
  5. Import the OracleAS Single Sign-On data to the replica:

    REPLICA_HOME/sso/bin/ssomig -import -overwrite -s 
    orasso -p replica_orasso_passwd -c replica_db_name -log_d
    $REPLICA_HOME/sso/log -discoforce
    
    

    In the example, replica_orasso_passwd is the ORASSO password obtained in the previous step.

  6. Verify that the export and import of OracleAS Single Sign-On succeeded.

    Verify that the OracleAS Single Sign-On migration tool reported success. You can also check the following log files for errors:

    MASTER_HOME/sso/log/ssomig.log
    REPLICA_HOME/sso/log/ssomig.log
    

    See Also:

    Oracle Application Server Single Sign-On Administrator's Guide for information on interpreting messages in the log files

Migrate the Directory Integration and Provisioning Data 

To migrate your Directory Integration and Provisioning Data:


See Also:

Directory Integration and Provisioning Data documentation in the Oracle Internet Directory Administrator's Guide for information about running the following commands using the HTTPS port in environments in which the Oracle Internet Directory HTTP port is disabled

  1. Stop the Directory Integration and Provisioning Data server on the master:

    MASTER_HOME/bin/oidctl server=odisrv instance=1 stop
    
    
  2. Migrate the Directory Integration and Provisioning Data:

    MASTER_HOME/bin/dipassistant reassociate -src_ldap_host
    master_host -src_ldap_port
    master_oid_port -dst_ldap_host
    replica_host -dst_ldap_port replica_oid_port -src_ldap_passwd
    master_orcladmin_passwd -dst_ldap_passwd replica_orcladmin_passwd
    
    

    This command prints log messages to:

    MASTER_HOME/ldap/odi/log/reassociate.log
    
    
  3. Stop the Directory Integration and Provisioning Data server on the replica:

    REPLICA_HOME/bin/oidctl server=odisrv instance=1 stop
    
    
  4. Register the Directory Integration and Provisioning Data server on the replica:

    REPLICA_HOME/bin/odisrvreg -D "cn=orcladmin" -w
    replica_orcladmin_passwd -h replica_host -p replica_oid_port
    
    
  5. Start the Directory Integration and Provisioning Data server on the replica:

    REPLICA_HOME/bin/oidctl server=odisrv instance=1 flags="port=replica_oid_port" start
    

Task 3: Change Middle-Tier Instances to the New Identity Management

In each middle-tier instance, run the Change Identity Management wizard and restart the instance:

  1. Using the Application Server Control Console, navigate to the Home page for the middle-tier instance.

  2. Click Infrastructure.

  3. On the Infrastructure Page, in the Identity Management section, click Change.

  4. Follow the steps in the wizard for supplying the new Identity Management information.

  5. When the wizard is finished, navigate to the Home page for the instance and start your instance by clicking Start All.

If you have a problem changing the middle-tier instances to the new host, check to make sure replication is running and try again.

Task 4: Stop Replication

Stop the replication between the original Identity Management and the new Identity Management (Replica) by running the following command in the new Identity Management Oracle home:

oidctl connect=global_db_name server=oidrepld instance=1 flags="-p oid_port" stop

In the example, global_db_name is the global database name of the new Identity Management. (This is referred to as replica_db_name in Section H.2, "Installing and Setting Up an LDAP-Based Replica".)

In the example, oid_port is the non-SSL Oracle Internet Directory port in the new Identity Management.

9.4.4 Strategy for Performing Failover with This Procedure

As mentioned in Section 9.4.1, you can modify this procedure to perform failover for Identity Management. This enables you to move your middle-tier instances to the new Identity Management in case the original is lost.

To perform failover:

  1. Install and set up the new Identity Management as described in "Task 1: Install and Set Up the New Identity Management and Metadata Repository".

  2. Export Oracle Application Server Single Sign-On and Directory Integration and Provisioning Data on a regular basis from the original Metadata Repository. You do not need to import the data into the new Metadata Repository. You only need to export the data and copy the files to the new Metadata Repository Host. Refer to "Task 2: Migrate OracleAS Single Sign-On and Directory Integration and Provisioning Data".

  3. If you lose the original Identity Management:

    1. Stop replication. Refer to "Task 4: Stop Replication".

    2. Import your most recent copy of the Oracle Application Server Single Sign-On and Directory Integration and Provisioning Data into the new Identity Management repository. Refer to "Task 2: Migrate OracleAS Single Sign-On and Directory Integration and Provisioning Data".

    3. Change the middle-tier instances to use the new Identity Management. Refer to "Task 3: Change Middle-Tier Instances to the New Identity Management".

9.5 Changing the Metadata Repository Used by a Middle-Tier Instance

This section provides a procedure for changing the Metadata Repository used by a middle-tier instance. This procedure involves making a copy of the original Metadata Repository on a different host, and then changing the middle-tier instance to use the new Metadata Repository.

9.5.1 Sample Uses for This Procedure

The following are sample uses for this procedure:

  • You have an existing Metadata Repository that is used by one or more middle-tier instances. Your organization intends to replace the current Metadata Repository host with a new system. You can use this procedure to copy the Metadata Repository to the new host and change your middle-tier instances to use the new Metadata Repository. You can then retire the original host.

  • You want to move a Metadata Repository from a host in your test environment, to a host in your Production Environment. You can use this procedure to copy the Metadata Repository from the test to production host, and change your test middle-tier instances to use the new Metadata Repository.

9.5.2 Assumptions and Restrictions

In this scenario:

  • The middle-tier instances use Identity Management.

  • The Identity Management installation does not use the original Metadata Repository for its Identity Management schemas; it uses a separate Metadata Repository.

  • The original Metadata Repository:

    • Is used for product metadata and DCM management only (it is not used by Identity Management)

    • Must be registered with Oracle Internet Directory

  • The new Metadata Repository:

    • Must not be registered with Oracle Internet Directory initially. During the procedure, you will register it with the same Oracle Internet Directory as the original Metadata Repository.

    • Must be created with the same Oracle home, datafile location, SID, and global database name as the original Metadata Repository. You will eventually change the global database name to a unique name.

  • OracleAS Certificate Authority is not supported by this procedure and must not be configured in your environment.

  • If the Metadata Repository is used for OracleAS Clusters, the cluster members will not be accessible until all members of the cluster have been changed to the new Metadata Repository.

9.5.3 Overview

An overview of the procedure is as follows:

  1. You have an original Metadata Repository. It is used by one or more middle-tier instances for product metadata. The middle-tier instances use Identity Management, and the Metadata Repository is registered with Oracle Internet Directory in that Identity Management.

    Figure 9-4 shows a sample original Metadata Repository (orcl1.myco.com).

    Figure 9-4 Original Metadata Repository

    Original Metadata Repository
    Description of "Figure 9-4 Original Metadata Repository"

  2. You create a copy of the original Metadata Repository by installing a new Metadata Repository, backing up the original Metadata Repository, and restoring to the new Metadata Repository.

    Figure 9-5 shows sample original and new Metadata Repositories.

    Figure 9-5 Original Metadata Repository and New Metadata Repository

    Original Metadata Repository and New Metadata Repository
    Description of "Figure 9-5 Original Metadata Repository and New Metadata Repository"

    The following table shows sample attributes for the original and new Metadata Repositories after you installed the new Metadata Repository:

    Attribute Original Metadata Repository New Metadata Repository
    Oracle home /private/oraHome /private/oraHome
    Datafile location /private/oraHome/oradata /private/oraHome/oradata
    SID orcl1 orcl1
    Global database name orcl1.myco.com orcl1.myco.com
    Registered with Oracle Internet Directory? Yes No

  3. You perform the following tasks to change to the new Metadata Repository. The tasks are shown in Figure 9-6.

    • 1: Change the global database name of the new Metadata Repository to a unique name (in this sample, orcl2.myco.com).

    • 2: Register the new Metadata Repository with the same Oracle Internet Directory as the old Metadata Repository.

    • 3: Change the middle-tier instances to use the new Metadata Repository.

    Figure 9-6 Changing from the Original to the New Metadata Repository

    Changing from the Original to the New Metadata Repository
    Description of "Figure 9-6 Changing from the Original to the New Metadata Repository"

    The following table shows the sample attributes for the original Metadata Repository and the attributes for the new Metadata Repository after you perform this step.

    Attribute Original Metadata Repository New Metadata Repository
    Oracle home /private/oraHome /private/oraHome
    Datafile location /private/oraHome/oradata /private/oraHome/oradata
    SID orcl1 orcl1
    Global database name orcl1.myco.com orcl2.myco.com
    Registered with Oracle Internet Directory? Yes Yes

  4. If you are using the scenario where you no longer require the original Metadata Repository, you can discard the original Metadata Repository.

9.5.4 Procedure

To change the Metadata Repository, perform the following tasks:

Before You Begin

If your middle-tier instances use OracleAS Portal and Oracle Ultra Search, you will need to supply the WKSYS schema password later in this procedure. You should obtain this password now from the old Metadata Repository.


Note:

For information on how to obtain the WKSYS password, see Section 6.3, "Viewing OracleAS Metadata Repository Schema Passwords".

Task 1: Install the New Metadata Repository

Install the new Metadata Repository as follows:

  1. Make sure you install the Metadata Repository into an Oracle home that has the same path as the old Metadata Repository Oracle home.

  2. Use Oracle Universal Installer to install the Metadata Repository.

  3. Choose to install an Infrastructure.

  4. Choose to install a Metadata Repository only.

  5. Do not register the Metadata Repository with Oracle Internet Directory.

  6. Specify the same SID and global database name as the old Metadata Repository.

  7. Specify the same datafile location as the old Metadata Repository.

Task 2: Back Up the Original Metadata Repository

In this task, you create a backup of the original Metadata Repository. This section provides the steps for creating the backup using Oracle Recovery Manager; however, if you are an experienced DBA, you can back up the Metadata Repository according to your standard practices.

Perform all of the steps in this task on the original Metadata Repository host:

  1. Create directories to store backup files and log files. For example:

    mkdir -p BACKUP_DIR/log_files
    mkdir -p BACKUP_DIR/db_files
    
    
  2. Make sure the original Metadata Repository is started.

  3. Make sure you have set the ORACLE_HOME and ORACLE_SID environment variables.

  4. Connect to the database as a user with SYSDBA privileges.

  5. Obtain the DBID of the original Metadata Repository using SQL*Plus:

    SQL> SELECT DBID FROM v$database;
    
    

    Make note of this value; you will use it later in the procedure.

  6. Create a file named BACKUP_DIR/cold_backup.rcv. Enter the following lines in the file:

    shutdown immediate;
    startup mount;
    configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to 'BACKUP_DIR/db_files/%F';
    
    run {
    allocate channel dev1 device type disk format
    'BACKUP_DIR/db_files/%U';
    backup database plus archivelog;
    release channel dev1;
    }
    
    

    In the file, substitute the full path for BACKUP_DIR.

  7. Run Oracle Recovery Manager to back up the Metadata Repository.

    • You can run Oracle Recovery Manager on the Metadata Repository host as follows (the following is a single command; type it all on one line):

      ORACLE_HOME/bin/rman target / 
      cmdfile=BACKUP_DIR/cold_backup.rcv > BACKUP_DIR/log_files/backup.log
      
      

      Note that the preceding command contains a forward slash "/" character.

    • You can run Oracle Recovery Manager from another host on the network as follows (the following is a single command; type it all on one line):

      ORACLE_HOME/bin/rman target SYS/oracle@trgt
      cmdfile=BACKUP_DIR/cold_backup.rcv > BACKUP_DIR/log_files/backup.log
      
      
  8. Copy the backup directories to the new host.


    Note:

    If you copy the files to a different location on the new host, you must use the CATALOG command to update the RMAN repository with the new filenames and use the CHANGE ... UNCATALOG command to uncatalog the old filenames.

    See Oracle Database Backup and Recovery Advanced User's Guide in the Oracle Database documentation for more information about the CATALOG command.


Task 3: Restore the Backup to the New Metadata Repository

In this task, you restore the backup to the new Metadata Repository.

Perform all of the steps in this task on the new Metadata Repository host.

  1. Make sure the new Metadata Repository is shut down:

    sqlplus "SYS/sys_password as SYSDBA"
    SQL> SHUTDOWN IMMEDIATE;
    
    
  2. Regenerate the password file:

    • On UNIX:

      mv ORACLE_HOME/dbs/orapwORACLE_SID ORACLE_HOME/dbs/orapwORACLE_SID.old
      
      ORACLE_HOME/bin/orapwd file=ORACLE_HOME/dbs/orapwORACLE_SID password=new_password
      
      
    • On Windows:

      move ORACLE_HOME\database\PWDORACLE_SID.ora
      ORACLE_HOME\database\PWDORACLE_SID.ora.old
      
      ORACLE_HOME\bin\orapwd file=ORACLE_HOME\database\PWDORACLE_SID.ora password=new_password
      
      

    In the examples, new_password is the new SYS password. You can use the old SYS password, or set it to a new password.

  3. Start the new Metadata Repository but do not mount it:

    SQL> STARTUP NOMOUNT;
    
    
  4. Create a file named BACKUP_DIR/restore.rcv that contains the following lines. In the file, substitute the full path for BACKUP_DIR and the DBID value you obtained in the previous task for dbid.

    set dbid=DBID;
    connect target /;
    set controlfile autobackup format for device type disk to 'BACKUP_DIR/db_files/%F';
    restore controlfile from autobackup;
    startup mount force;
    
    run {
    allocate channel dev1 device type disk format
    'BACKUP_DIR/db_files/%U';
    restore database;
    release channel dev1;
    alter database open resetlogs;
    }
    
    
  5. Run Oracle Recovery Manager to restore the Metadata Repository.

    • If you are logged into the host machine for the Metadata Repository, run the following command:

      ORACLE_HOME/bin/rman cmdfile=BACKUP_DIR/restore.rcv >
      BACKUP_DIR/log_files/restore.log
      
      
    • If you are accessing the host machine for the Metadata Repository from another machine on the network, edit the following file:

      BACKUP_DIR/restore.rcv
      
      

      Make sure the file contains the following line:

      TARGET SYS/oracle@trgt
      
      

      Run the following command:

      ORACLE_HOME/bin/rman cmdfile=BACKUP_DIR/restore.rcv >
      BACKUP_DIR/log_files/restore.log
      
      
  6. After you restore using Oracle Recovery Manager, determine if the TEMP tablespace has a datafile by connecting to the database as a user with SYSDBA privileges and running the following command in SQL*Plus:

    SQL> select file_name from dba_temp_files where tablespace_name like 'TEMP';
    
    

    If the preceding command does not return any files, take the following steps:

    1. Check if the following file exists on your system:

      ORADATA_DIRECTORY/db_name/temp01.dbf
      
      
    2. If the file exists, enter the following command:

      SQL> alter tablespace "TEMP" add tempfile 'ORADATA_DIRECTORY/
      db_name/temp01.dbf' 
      size 5120K reuse autoextend on next 8k maxsize unlimited;
      
      

      If the file does not exist, enter the following command:

      SQL> alter tablespace "TEMP" add tempfile 'ORADATA_DIRECTORY/
      db_name/temp01.dbf' size 5120K autoextend on next 8k maxsize unlimited;
      
      

      Note that you must type the preceding commands on one line, and db_name is the first portion of the new global database name.

Task 4: Configure Oracle Ultra Search Metadata in the New Metadata Repository

Perform this task on the new Metadata Repository:

  1. Make sure the ORACLE_HOME and ORACLE_SID environment variables are set.

  2. Run the following commands:

    (UNIX)    cd ORACLE_HOME/ultrasearch/admin
    (Windows) cd ORACLE_HOME\ultrasearch\admin
    
    sqlplus "SYS/sys_password as SYSDBA"
    SQL> @wk0config.sql WksysPw JDBC_ConnStr LAUNCH_ANYWHERE ""
    
    

    (Note the two double quotes at the end of the preceding command.)

    In the example:

    • WksysPw is the password of the WKSYS schema that you obtained at the beginning of this procedure.

    • JDBC_ConnStr is the JDBC connection string host:port:SID, for example: myhost:1521:testdb.

    • LAUNCH_ANYWHERE is TRUE if the Metadata Repository is in Real Application Clusters mode, otherwise FALSE. For this procedure, set it to FALSE.

Task 5: Change the Global Database Name for the New Metadata Repository

In this task, you change the global database name of the new Metadata Repository to a new, unique name so you can register it with Oracle Internet Directory.

Perform all of the steps in this task on the new Metadata Repository host:

  1. Run the following commands to set up the database:

    sqlplus "SYS/sys_password as SYSDBA"
    SQL> alter system switch logfile;
    SQL> alter database backup controlfile to trace resetlogs;
    
    
  2. Check the spfile using SQL*Plus:

    SQL> select value from v$parameter where name='spfile';
    
    
  3. If the previous command returns no rows, skip this step.

    Check if the previous command returns output like the following:

    VALUE
    ----------------------------------
    ?/dbs/spfile@.ora
    
    

    If it does, run the following command to create a pfile from the spfile:

    • On Unix:

      SQL> create pfile='ORACLE_HOME/dbs/initORACLE_SID.ora' from spfile;
      
      
    • On Windows:

      SQL> create pfile='%ORACLE_HOME%\database\initORACLE_SID.ora' from spfile;
      
      

    In the example, ORACLE_SID is the SID of the original and new Metadata Repository.

  4. Shut down the new Metadata Repository:

    SQL> SHUTDOWN IMMEDIATE;
    
    

    The database must be shut down with SHUTDOWN NORMAL or SHUTDOWN IMMEDIATE. Do not use SHUTDOWN ABORT.

  5. Rename the spfile so the pfile will be used when the database instance is restarted:

    • On Unix:

      cd ORACLE_HOME/dbs
      mv spfileORACLE_SID.ora spfileORACLE_SID.ora.save
      
      
    • On Windows:

      cd ORACLE_HOME\database
      rename spfileORACLE_SID.ora spfileORACLE_SID.ora.save
      
      
  6. Edit the following file:

    (UNIX) ORACLE_HOME/dbs/initORACLE_SID.ora
    (Windows) ORACLE_HOME\database\initORACLE_SID.ora
    
    

    Update the db_name to the new db_name (the first portion of the new global database name). For example, if the new global database name is orcl1.myco.com, the value of db_name should be orcl1. Note that this is not necessarily (nor likely) the same value as the SID on the new Metadata Repository.

    Also, update all other instances of the old db_name to the new db_name. Specifically, you should update directory paths that contain the old db_name. If the directory paths are not updated, when you run the ccf.sql script in step 16, the script will fail.

  7. Rename the following directory with the new db_name:

    (UNIX)  ORADATA_DIRECTORY/db_name
    (Windows) ORADATA_DIRECTORY\db_name
    
    
  8. Rename the control files so they do not exist later when the new ones are created:

    (UNIX)   cd ORADATA_DIRECTORY/db_name
    (Windows) cd ORADATA_DIRECTORY\db_name
    
    mv control01.ctl control01.ctl.old
    mv control02.ctl control02.ctl.old
    mv control03.ctl control03.ctl.old
    
    
  9. Rename the following directory with the new db_name:

    (UNIX)   ORACLE_HOME/admin/db_name
    (Windows) ORACLE_HOME\..\admin\db_name
    
    

    Note that on Windows, the admin directory is in the same directory as the Oracle home.

  10. Edit the following file:

    (UNIX)   ORACLE_HOME/admin/db_name/pfile/init.ora.NNNNNNNNNNNNN
    (Windows) ORACLE_HOME\..\admin\db_name\pfile\init.ora.NNNNNNNNNNNNN
    
    

    Note that the filename includes a random number at the end.

    Change all instances of the old db_name to the new db_name; do not update the SID. To do this, change the old db_name in all directory paths and the db_name parameter.

  11. Change to the trace file directory:

    (UNIX)    cd ORACLE_HOME/admin/db_name/udump
    (Windows) cd ORACLE_HOME\..\admin\db_name\udump
    
    

    Note that the preceding is the default location for the trace file directory. This location can be overridden by the user_dump_dest parameter in initORACLE_SID.ora or spfileORACLE_SID.ora.

  12. Locate the trace file; it has a name of the form ORACLE_SID_ora_NNNNN.trc, where NNNNN is a number. Choose the trace file with the most recent modification date.

  13. Copy the contents of the trace file, starting from the line with STARTUP NOMOUNT to the end of the file, into a new file named BACKUP_DIR/ccf.sql.

    Do not copy any the following lines, if they exist:

    *** TIMESTAMP kcrr.c
    ARCH: Archival disabled due to shutdown: 1089
    
    
  14. Edit BACKUP_DIR/ccf.sql as follows. (Example 9-1 shows an example of the ccf.sql file after performing the edits in this step.)

    1. Update the following line with the new global database name and change REUSE to SET:

      Before modification:

      CREATE CONTROLFILE REUSE DATABASE "Old_Global_DB_Name" RESETLOGS ...
      
      

      After modification:

      CREATE CONTROLFILE SET DATABASE "New_Global_DB_Name" RESETLOGS ...
      
      
    2. Remove the line that appears in one of the following two forms:

      # STANDBY LOGFILE
      -- STANDBY LOGFILE
      
      
    3. Comment out the following lines, if they exist, with "REM", as shown:

      REM RECOVER DATABASE USING BACKUP CONTROLFILE
      
      REM VARIABLE RECNO NUMBER;
      
      REM EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE
      AUTOBACKUP','ON');
      
      REM VARIABLE RECNO NUMBER;
      
      REM EXECUTE :RECNO := SYS.DBMS_BACKUP_
      RESTORE.SETCONFIG('CONTROLFILEAUTOBACKUP FORMAT FOR DEVICE TYPE','DISK TO
       BACKUP_DIR/db_files/%F');
      
      REM ALTER TABLESPACE TEMP ADD TEMPFILE
      'ORACLE_HOME/TEMP01.DBF' SIZE 5242880 AUTOEXTEND ON MAXSIZE 4294950912 REUSE;
      
      
    4. Change all comment symbols to REM. Depending on your platform, the comment symbol may be # or --.

    Example 9-1 Example ccf.sql File after Edits

    STARTUP NOMOUNT
    CREATE CONTROLFILE set DATABASE "NEW DATABASE" RESETLOGS ARCHIVELOG
       MAXLOGFILES 50
       MAXLOGMEMBERS 5
       MAXDATAFILES 100
       MAXINSTANCES 1
       MAXLOGHISTORY 226
    LOGFILE
     GROUP 1 '/private1/inst/oradata/orcl/redo01.log'  SIZE 50M,
     GROUP 2 '/private1/inst/oradata/orcl/redo02.log'  SIZE 50M,
     GROUP 3 '/private1/inst/oradata/orcl/redo03.log'  SIZE 50M
    DATAFILE
     '/private1/inst/oradata/orcl/system01.dbf',
     '/private1/inst/oradata/orcl/undotbs01.dbf',
     '/private1/inst/oradata/orcl/drsys01.dbf',
     '/private1/inst/oradata/orcl/dcm.dbf',
     '/private1/inst/oradata/orcl/portal.dbf',
     '/private1/inst/oradata/orcl/ptldoc.dbf',
     '/private1/inst/oradata/orcl/ptlidx.dbf',
     '/private1/inst/oradata/orcl/ptllog.dbf',
     '/private1/inst/oradata/orcl/oca.dbf',
     '/private1/inst/oradata/orcl/discopltc1.dbf',
     '/private1/inst/oradata/orcl/discopltm1.dbf',
     '/private1/inst/oradata/orcl/oss_sys01.dbf',
     '/private1/inst/oradata/orcl/wcrsys01.dbf',
     '/private1/inst/oradata/orcl/uddisys01.dbf',
     '/private1/inst/oradata/orcl/ip_dt.dbf',
     '/private1/inst/oradata/orcl/ip_rt.dbf',
     '/private1/inst/oradata/orcl/ip_idx.dbf',
     '/private1/inst/oradata/orcl/ip_lob.dbf',
     '/private1/inst/oradata/orcl/attrs1_oid.dbf',
     '/private1/inst/oradata/orcl/battrs1_oid.dbf',
     '/private1/inst/oradata/orcl/gcats1_oid.dbf',
     '/private1/inst/oradata/orcl/gdefault1_oid.dbf',
     '/private1/inst/oradata/orcl/svrmg1_oid.dbf',
     '/private1/inst/oradata/orcl/ias_meta01.dbf'
    CHARACTER SET WE8MSWIN1252
    ;
    REM Configure RMAN configuration record 1
    REM VARIABLE RECNO NUMBER;
    REM EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE
    AUTOBACKUP','ON');
    REM Configure RMAN configuration record 2
    REM VARIABLE RECNO NUMBER;
    REM EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE AUTOBACKUP
    FORMAT FOR DEVICE TYPE','DISK TO /private1/inst/backup_dir/db_files/%F');
    REM Recovery is required if any of the datafiles are restored backups,
    REM or if the last shutdown was not normal or immediate.
    REM RECOVER DATABASE USING BACKUP CONTROLFILE
    REM Database can now be opened zeroing the online logs.
    ALTER DATABASE OPEN RESETLOGS;
    REM No tempfile entries found to add.
    
    
  15. Edit the following script:

    BACKUP_DIR/ccf.sql
    
    

    Replace the old global database name with the new global database name throughout the script.

  16. Run the ccf.sql script:

    SQL> @BACKUP_DIR/ccf.sql
    
    
  17. Change the global database name in the database:

    SQL> alter database rename global_name to New_Global_DB_Name;
    
    
  18. Determine if the TEMP tablespace has a datafile by connecting to the database as a user with SYSDBA privileges and running the following command in SQL*Plus:

    SQL> select file_name from dba_temp_files where tablespace_name like 'TEMP';
    
    

    If the preceding command does not return any files, take the following steps:

    1. Check if the following file exists on your system:

      ORADATA_DIRECTORY/db_name/temp01.dbf
      
      
    2. If the file exists, enter the following command:

      SQL> alter tablespace "TEMP" add tempfile 'ORADATA_DIRECTORY/
      db_name/temp01.dbf' 
      size 5120K reuse autoextend on next 8k maxsize unlimited;
      
      

      If the file does not exist, enter the following command:

      SQL> alter tablespace "TEMP" add tempfile 'ORADATA_DIRECTORY/
      db_name/temp01.dbf' size 5120K autoextend on next 8k maxsize unlimited;
      
      

      Note that you must type the preceding commands on one line, and db_name is the first portion of the new global database name.

  19. Update the service name and the global database name to the new global database name in the following file:

    (UNIX) ORACLE_HOME/network/admin/tnsnames.ora
    (Windows) ORACLE_HOME\network\admin\tnsnames.ora
    
    

    Note that you should not change the SID.

  20. Edit the following file:

    (UNIX) ORACLE_HOME/config/ias.properties
    (Windows) ORACLE_HOME\config\ias.properties
    
    

    Change the InfrastructureDBCommonName parameter to the new global database name.

Task 6: Register the New Metadata Repository with Oracle Internet Directory

In this task, you register the new Metadata Repository with the same Oracle Internet Directory used by the original Metadata Repository. To do this, you run Oracle Application Server Metadata Repository Creation Assistant (OracleAS Metadata Repository Creation Assistant), a wizard that guides you through the registration.


Note:

OracleAS Metadata Repository Creation Assistant is available on the "OracleAS Metadata Repository Creation Assistant" CD-ROM.

  1. Using SQL*Plus, log in to the new Metadata Repository as SYS with SYSDBA privileges.

    1. Run the following SQL commands:

      SQL> execute dbms_ias_version.set_component_loading(component_id=>'MRC',
      component_name=>'Oracle Application Server Metadata Repository Version',
      schema_name=>'SYS');
      
      SQL> execute dbms_ias_version.set_component_valid(component_id=>'MRC');
      
      
    2. Verify that the following command returns the following value:

      SQL> select comp_name, version, status from app_registry where comp_id='MRC';
      
      COMP_NAME                                               VERSION     STATUS
      -----------------------------------------------------   ---------   -------
      Oracle Application Server Metadata Repository Version-R  10.1.2.0.1  VALID
      
      
  2. Register the new Metadata Repository with Oracle Internet Directory:


    See Also:

    Oracle Application Server Metadata Repository Creation Assistant User's Guide for more information on how to perform the following steps

    1. Install OracleAS Metadata Repository Creation Assistant into its own Oracle home on the host where the new Metadata Repository resides. In the Select a Product to Install screen, choose Oracle Application Server Repository Creation Assistant.

    2. Run OracleAS Metadata Repository Creation Assistant as follows:

      (UNIX)  ORACLE_HOME_RepCA/runRepca
      (Windows) ORACLE_HOME_RepCA\runRepca.bat
      
      

      The wizard guides you through the process.

    3. When the process is finished, an ldap.ora file is created in the OracleAS Metadata Repository Creation Assistant Oracle home. Copy this file to the new Metadata Repository Oracle home.

      Copy the file from:

      (UNIX)  ORACLE_HOME_RepCA/network/admin/ldap.ora
      (Windows) ORACLE_HOME_RepCA\network\admin\ldap.ora
      
      

      To:

      (UNIX)  ORACLE_HOME_NEW_METADATA_REPOSITORY/network/admin/ldap.ora
      (Windows) ORACLE_HOME_NEW_METADATA_REPOSITORY\network\admin\ldap.ora
      

Task 7: Change Middle-Tier Instances to the New Metadata Repository

On each middle-tier instance you want to change to the new Metadata Repository, run the Change Metadata Repository wizard and restart the instance:

  1. Using the Application Server Control Console, navigate to the Home page for the middle-tier instance.

  2. Make sure all components except Management are down. If not, click Stop All to stop them. Note that this will not stop Management.

  3. Click Infrastructure.

  4. On the Infrastructure Page, in the Metadata Repository section, click Change.

  5. Follow the steps in the wizard for supplying the new Metadata Repository information.

  6. When the wizard is finished, navigate to the Home page for the instance and start your instance by clicking Start All.

Task 8: Update the Farm Name

Run the following command in the Oracle home of one of the middle-tier instances that you changed to use the new Metadata Repository in the previous task:

(UNIX)  ORACLE_HOME/dcm/bin/dcmctl resetFarmName new_farm_name
(Windows) ORACLE_HOME\dcm\bin\dcmctl resetFarmName new_farm_name

In the example, new_farm_name is the global database name of the new Metadata Repository.


Note:

You only need to run the command in one middle-tier instance. The command updates all other instances.

9.6 Changing the Metadata Repository Used by Identity Management

This section provides a procedure for changing the Metadata Repository used by Identity Management. This procedure involves making a copy of the original Metadata Repository on a different host, and then changing the Identity Management components to use the new Metadata Repository.

9.6.1 Sample Uses for This Procedure

The following are sample uses for this procedure:

  • You have an Identity Management installation using a Metadata Repository. You want to move the Metadata Repository to a different host so you can retire the original Metadata Repository.

  • Your current Metadata Repository host is overloaded and you want to move the Metadata Repository to a host that can handle a heavier load.

9.6.2 Assumptions and Restrictions

Note the following assumptions and restrictions to using the procedure:

  • The Identity Management installation can reside in one Oracle home, or its components can be distributed across several Oracle homes.

  • The original Metadata Repository must not reside on the same host as the Identity Management installation.

  • The new Metadata Repository:

    • Must reside on a different host than the original Metadata Repository. That host must use the same operating system platform as the original.

    • Must use the same Oracle home, datafile location, SID, and global database name as the original Metadata Repository.

    • Can use a different database listener port than the original.

9.6.3 Procedure

To change the Metadata Repository, perform the following tasks:

Task 1: Install the New Metadata Repository

Install the new Metadata Repository as follows:

  1. Make sure you install the Metadata Repository into an Oracle home that has the same path as the old Metadata Repository Oracle home.

  2. Use Oracle Universal Installer to install the Metadata Repository.

  3. Choose to install an Infrastructure.

  4. Choose to install a Metadata Repository only.

  5. Do not register the Metadata Repository with Oracle Internet Directory.

  6. Specify the same SID and global database name as the old Metadata Repository.

  7. Specify the same datafile location as the old Metadata Repository.

Task 2: Shut Down Your Environment

Shut down your environment:

  1. Shut down all middle-tier instances that use Identity Management.

  2. Run the following command in the Identity Management Oracle home:

    ORACLE_HOME/opmn/bin/opmnctl stopall
    ORACLE_HOME\opmn\bin\opmnctl stopall
    
    

    If the Identity Management installation is distributed across several Oracle homes, also run the command in the Oracle Internet Directory Oracle home.

  3. If you use OracleAS Certificate Authority, stop it as follows:

    (UNIX)  ORACLE_HOME/oca/bin/ocactl stop
    (Windows)  ORACLE_HOME\oca\bin\ocactl stop
    

Task 3: Back Up the Original Metadata Repository

In this task, you create a backup of the original Metadata Repository. This section provides the steps for doing this using Oracle Recovery Manager; however, if you are an experienced DBA, you can back up the Metadata Repository according to your standard practices.

Perform all of the steps in this task on the original Metadata Repository host:

  1. Create directories to store backup files and log files. For example:

    mkdir -p BACKUP_DIR/log_files
    mkdir -p BACKUP_DIR/db_files
    
    
  2. Make sure the original Metadata Repository is started.

  3. Make sure you have set the ORACLE_HOME and ORACLE_SID environment variables before you run the SQL*Plus command.

  4. Obtain the DBID of the original Metadata Repository using SQL*Plus:

    SQL> SELECT DBID FROM v$database;
    
    

    Make note of this value; you will use it later in the procedure.

  5. Create a file named BACKUP_DIR/cold_backup.rcv. Enter the following lines in the file:

    shutdown immediate;
    startup mount;
    configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to
    'BACKUP_DIR/db_files/%F';
    
    run {
    allocate channel dev1 device type disk format
    'BACKUP_DIR/db_files/%U';
    backup database plus archivelog;
    release channel dev1;
    }
    
    

    In the file, substitute the full path for BACKUP_DIR.

  6. Run Oracle Recovery Manager to back up the Metadata Repository.

    • You can run Oracle Recovery Manager on the Metadata Repository host as follows (the following is a single command; type it all on one line):

      ORACLE_HOME/bin/rman target / 
      cmdfile=BACKUP_DIR/cold_backup.rcv > BACKUP_DIR/log_files/backup.log
      
      

      Note that the preceding command contains a forward slash "/" character.

    • You can run Oracle Recovery Manager from another host on the network as follows (the following is a single command; type it all on one line):

      ORACLE_HOME/bin/rman target SYS/oracle@trgt
      cmdfile=BACKUP_DIR/cold_backup.rcv > BACKUP_DIR/log_files/backup.log
      
      
  7. Copy the backup directories to the new host.


    Note:

    If you copy the files to a different location on the new host, you must use the CATALOG command to update the RMAN repository with the new filenames and use the CHANGE ... UNCATALOG command to uncatalog the old filenames.

    See Oracle Database Backup and Recovery Advanced User's Guide in the Oracle Database documentation for more information about the CATALOG command.


Task 4: Restore the Backup to the New Metadata Repository

In this task, you restore the backup to the new Metadata Repository.

Perform all of the steps in this task on the new Metadata Repository host:

  1. Make sure the new Metadata Repository is shut down:

    sqlplus "SYS/sys_password as SYSDBA"
    SQL> SHUTDOWN IMMEDIATE;
    
    
  2. Regenerate the password file:

    • On UNIX:

      mv ORACLE_HOME/dbs/orapwORACLE_SID ORACLE_HOME/dbs/orapwORACLE_SID.old
      ORACLE_HOME/bin/orapwd file=ORACLE_HOME/dbs/
      orapwORACLE_SID password=new_password
      
      
    • On Windows:

      mv ORACLE_HOME\database\PWDORACLE_SID.ora ORACLE_HOME\database\
      PWDORACLE_SID.ora.old
      ORACLE_HOME\bin\orapwd file=ORACLE_HOME\database\PWDORACLE_SID.ora password=new_password
      
      

    In the example, new_password is the new SYS password. You can use the old SYS password, or set it to a new password.

  3. Start the new Metadata Repository, but do not mount it:

    SQL> STARTUP NOMOUNT;
    
    
  4. Create a file named BACKUP_DIR/restore.rcv that contains the following lines. In the file, substitute the full path for BACKUP_DIR and the DBID obtained in the previous task.

    set dbid=DBID;
    connect target /;
    set controlfile autobackup format for device type disk to
     'BACKUP_DIR/db_files/%F';
    restore controlfile from autobackup;
    startup mount force;p
    
    run {
    allocate channel dev1 device type disk format
    'BACKUP_DIR/db_files/%U';
    restore database;
    release channel dev1;
    alter database open resetlogs;
    }
    
    
  5. Run Oracle Recovery Manager to restore the Metadata Repository:

    ORACLE_HOME/bin/rman cmdfile=BACKUP_DIR/restore.rcv > 
    BACKUP_DIR/log_files/restore.log
    
    
  6. After you restore using Oracle Recovery Manager, determine if the TEMP tablespace has a datafile by connecting to the database as a user with SYSDBA privileges and running the following command in SQL*Plus:

    SQL> select file_name from dba_temp_files where tablespace_name like 'TEMP';
    
    

    If the preceding command does not return any files, add a datafile:

    SQL> alter tablespace "TEMP" add tempfile 'ORADATA_DIRECTORY/ \
    db_name/temp01.dbf' size 5120K autoextend on next 8k maxsize unlimited;
    
    

    In the example, db_name is the first portion of the new global database name.

    Note that the preceding command creates a file called temp01.dbf and adds it to the TEMP tablespace. If the temp01.dbf file already exists in the directory, add a REUSE clause to the command:

    SQL> alter tablespace "TEMP" add tempfile 'ORADATA_DIRECTORY/ \
    db_name/temp01.dbf' size 5120K reuse autoextend on next 8k maxsize unlimited;
    

Task 5: Update Oracle Internet Directory

In the Oracle Internet Directory home, update the following file with the new Metadata Repository hostname (and, optionally, the new port number):

(UNIX) ORACLE_HOME/network/admin/tnsnames.ora
(Windows) ORACLE_HOME\network\admin\tnsnames.ora

After you modify the file, use the tnsping command to make sure you can reach the new Metadata Repository:

(UNIX)  ORACLE_HOME/bin/tnsping net_service_name
(Windows) ORACLE_HOME\bin\tnsping net_service_name

For example:

ORACLE_HOME/bin/tnsping orcl

Task 6: Shut Down the Original Metadata Repository

Shut down the original Metadata Repository using your usual procedure.

Task 7: Start Oracle Internet Directory Using Special Commands

Start Oracle Internet Directory by taking the following steps (do not use opmnctl):

  1. Change directory to the Oracle Internet Directory home.

  2. Set the ORACLE_SID environment variable to the new Metadata Repository SID (the default is orcl).

  3. Start the Oracle Internet Directory monitor:

    (UNIX) ORACLE_HOME/bin/oidmon connect=connectstring start
    (Windows) ORACLE_HOME\bin\oidmon connect=connectstring start
    
    

    For example:

    OraHome1_AS\bin\oidmon connect=orcl start
    

Task 8: Update the Oracle Internet Directory Database Registration

Update Oracle Internet Directory with the new Metadata Repository hostname and, optionally, new port number:

  1. Start Oracle Directory Manager:

    • On UNIX, use the following command:

      ORACLE_HOME/bin/oidadmin
      
      
    • On Windows, navigate to Oracle Directory Manager (Start > Programs > Oracle Application Server Oracle_Home > Integrated Management Tools > Oracle Directory Manager.)

  2. Log in to Oracle Directory Manager.

  3. In the System Objects frame:

    1. Expand Entry Management.

    2. Expand cn=Oracle Context.

    3. Select the DBName for the OracleAS Metadata Repository. For example, if the DBName is the default, orcl, select cn=ORCL.

  4. On the Properties tab, update the HOST parameter in the orclnetdescstring field with the new hostname. Update the PORT parameter if you have changed the port number.

  5. Click Apply.

Task 9: Stop Oracle Internet Directory Using Special Commands

Stop Oracle Internet Directory by taking the following steps (do not use opmnctl):

  1. Change directory to the Oracle Internet Directory Oracle home.

  2. Set the ORACLE_SID environment variable to the new Metadata Repository SID (the default is orcl).

  3. Stop the Oracle Internet Directory monitor:

    (UNIX) ORACLE_HOME/bin/oidmon connect=connectstring stop
    (Windows) ORACLE_HOME\bin\oidmon connect=connectstring stop
    
    

    For example:

    OraHome1_AS\bin\oidmon connect=orcl stop
    

Task 10: Start Your Environment

Start your environment as follows:

  1. Start the Identity Management installation by running the following command in the Identity Management Oracle home:

    ORACLE_HOME/opmn/bin/opmnctl startall
    ORACLE_HOME\opmn\bin\opmnctl startall
    
    

    If the Identity Management installation is distributed across several Oracle homes, run the command in the Oracle Internet Directory home.

  2. Start all middle-tier instances that use Identity Management.

Task 11: Update OracleAS Certificate Authority

If you use OracleAS Certificate Authority, update it as follows:

  1. Associate it with the new Metadata Repository:

    (UNIX)  ORACLE_HOME/oca/bin/ocactl updateconnection
    (Windows) ORACLE_HOME\oca\bin\ocactl updateconnection
    
    
  2. Start OracleAS Certificate Authority:

    (UNIX) ORACLE_HOME/oca/bin/ocactl start
    (Windows) ORACLE_HOME\oca\bin\ocactl start