6 Performing an Out-of-Place Upgrade of Oracle Internet Directory

When upgrading Oracle Internet Directory, you migrate your existing directory data from an 11g Oracle Internet Directory instance to a newly installed 12c Oracle Internet Directory instance. This is a one time operation.

Note:

  • It is not supported to have a replication agreement between different releases of Oracle Internet Directory. So, after the data is moved, it will be kept in sync between the primary and the standby systems.
  • You can also use this procedure to migrate Oracle Internet Directory from one environment to another.

Complete the following steps to export the directory data from the 11g Oracle Internet Directory applications in the source environment and import the data into the 12c Oracle Internet Directory applications:

Pre-Upgrade Assessment

The pre-upgrade assessment prepares you to export the data from the 11g OID application's source environment and import the data into the 12c OID application's target environment.

You must ensure that the following assessment is complete before you perform the 11g to 12c Oracle Internet Directory data export and import configuration:

Validating the OID1 Instances

Before you start any replication activities, you must ensure that the OID1 instances in both the source 11g environment and the target 12c environment are running.

For information, see Validating that the OID1 Instances are Running.

Environment Variables for Oracle Internet Directory Tools

Before executing any of the Oracle Internet Directory tools, you must set the environment variables.

The following variables can also be added to the software owner’s environment file, so that the variables are set at user login. These variables should be set on both the source 11g environment and the target 12c environment OID instance hosts.
ORACLE_HOME
ORACLE_INSTANCE
TNS_ADMIN
DOMAIN_HOME (should be set to the value of MSERVER_HOME)

For more information, see Setting Environment Variables for Oracle Internet Directory Tools.

Set the Source Directory to Read-Only Mode

Before the directory information is exported from the source 11g environment, the instances there should be set as read-only, so that the new information is not written to the directory while the export is being created.

Perform the following steps to set the source 11g environment nodes as read-only:

Note:

Perform these steps only on the first source host. All tool execution requires that you set the environment variables for Oracle Internet Directory tools. See Environment Variables for Oracle Internet Directory Tools.
  1. Create an LDIF file with the following information:

    For Example:

    ro_change_mode.ldif:
    dn: cn=OID_INSTANCE_NAME,cn=osdldapd,cn=subconfigsubentry
    changetype: modify
    replace: orclservermode
    orclservermode: r
    dn: cn=OID_INSTANCE_NAME,cn=osdldapd,cn=subconfigsubentry
    changetype: modify
    replace: orclservermode
    orclservermode: r

    Where, OID_INSTANCE_NAME is the name of each instance. An entry is required for each instance in the Oracle Internet Directory cluster on the target 12c environment.

  2. Run the following command:

    ldapmodify -D "cn=orcladmin" -q -h ON_PREM_HOST -p ON_PREM_PORT -f CHANGE_LDIF_FILE

    For Example:

    ldapmodify -D "cn=orcladmin" -q -h s_ldaphost1 -p 3060 -f ro_change_mode.ldif

Exporting the Required Data from the Source Directory

The only data which needs to be exported is the data that does not exist in the target system. Data seeded by product installations is not required.

When you run the RCU utility, the Oracle Internet Directory instances will have some of the same base objects created by default in their database. Hence, the only data that needs to be exported from the source 11g directory is the data that does not exist in the target 12c directory.

These are the baseDN that is created by the Oracle Access Manager application, named cn=OAMConfigStore, and the baseDN realm.

If Oracle Access Manager is not installed in the customer’s environment, the OAM baseDN will not be available in the directory. The baseDN realm is a backward notated version of the customer’s domain name.

For example:

For a customer whose domain name is test.example.com, the baseDN will be dc=com.

Perform the following steps to export the required data.

Note:

Perform these steps only on the first source host. All tool execution requires that you set the environment variables for Oracle Internet Directory tools. See Environment Variables for Oracle Internet Directory Tools.
  1. Run the following command:

    ldifwrite connect="TNS_ENTRY" basedn="YOUR_BASEDN" ldiffile="BASEDN_LDIF_FILE"

    Where,
    • TNS_ENTRY is the entry found in ORACLE_INSTANCE/config/tnsnames.ora.
    • YOUR_BASEDN is the baseDN for the organization.
    • BASEDN_LDIF_FILE is the file to which the data is exported.

    For example:

    ldifwrite connect="OIDDB" basedn="dc=com" ldiffile="dc_com.ldif"

    Output example:
    This tool can only be executed if you know database user password for OID
    Enter OID Password :: ON-PREMISES_ODS_SCHEMA_PASSORD
    ------------------------------------------------------------
    Reading entries under BaseDN "dc=com"...
    ------------------------------------------------------------
    ------------------------------------------------------------
    217 Entries are written to "/u01/backup/dc_com.ldif".
    ------------------------------------------------------------
  2. Run the following command (can be skipped if your Oracle Internet Directory environment does not have OAM or OIG installed):

    ldifwrite connect="TNS_ENTRY" basedn=" cn=OAMConfigStore" ldiffile="OAMCS_LDIF_FILE"

    Where,
    • TNS_ENTRY is the entry found in ORACLE_INSTANCE/config/tnsnames.ora.
    • YOUR_BASEDN is the baseDN for the OAM config store.
    • OAMCS_LDIF_FILE is the file to which data is exported.

    For example:

    ldifwrite connect="OIDDB" basedn=" cn=OAMConfigStore" ldiffile="oamcs.ldif"

    Output example:
    This tool can only be executed if you know database user password for OID
    Enter OID Password :: ON-PREMISES_ODS_SCHEMA_PASSORD
    ------------------------------------------------------------
    Reading entries under BaseDN "cn=oamconfigstore"...
    ------------------------------------------------------------
    ------------------------------------------------------------
    1 Entries are written to "/u01/backup/oamcs.ldif"
    ------------------------------------------------------------
  3. Combine the two LDIF files into one file (if applicable):
    cat "/u01/backup/dc_com.ldif > "/u01/backup/backup_data.ldif && cat "/u01/backup/oamcs.ldif >> "/u01/backup/backup_data.ldif

Loading the Data

Complete the following steps to load the exported source data into the destination directory:

Copy the Exported Data File to the Target Environment Directory Host

Before performing the bulk load, you must copy the file containing the exported data to the first Oracle Internet Directory host in the target 12c environment.

Make a note of the file location after it is copied to the host. As the exported file is a flat text file, larger directories may need to have file compresses prior to copying. If this is the case, ensure that the file is uncompressed on the host.

Stop all Oracle Internet Directory Instances in the Target 12c Environment

Before executing the bulkdelete and bulkload, you should shutdown the Oracle Internet Directory instances in the target 12c environment.

Do the following on all the Oracle Internet Directory hosts in the target environment. All tool execution requires that you set the environment variables for Oracle Internet Directory tools. See Environment Variables for Oracle Internet Directory Tools.

  1. Run the following command from the ORACLE_HOME/oracle_common/common/bin location to launch the WLST tool:

    ./wlst.sh

  2. Connect to the Administration Server using the following command:
    connect(ADMIN_USERNAME','ADMIN_PASSWORD','t3://ADMIN_HOST:ADMIN_PORT')
    For example:
    connect(weblogic','password','t3://MYHOSTNAME:7001')
  3. Run the following command to shutdown the Oracle Internet Directory instance:
    /base_domain/serverConfig> shutdown('OID_NODE_NAME')

    For example:

    shutdown('oid1')

Deleting the Current baseDN Data in Bulk

Since the directory in the target 12c environment is created with a baseDN that is most likely a duplicate name, you should remove the duplicate baseDN from the 12c environment before you execute the bulkload. This deletion ensures that there are no conflicts with the bulkload.

Do the following on the first target 12c directory host only. All tool execution requires that you set the environment variables for Oracle Internet Directory tools. See Environment Variables for Oracle Internet Directory Tools.

Run the following command:
bulkdelete connect=TNS_ENTRY basedn="YOUR_BASEDN" cleandb="TRUE" verbose="TRUE"
Where,
  • TNS_ENTRY is the entry found in ORACLE_INSTANCE/config/tnsnames.ora.
  • YOUR_BASEDN is the baseDN for the OAM config store.
For example:
bulkdelete connect=OIDDB basedn="dc=com" cleandb="TRUE" verbose="TRUE"

Output example:

This tool can only be executed if you know database user password for OID
Enter OID Password :: OCI_ODS_SCHEMA_PASSORD
------------------------------------------------------------
Reading entries under BaseDN "dc=com"...
------------------------------------------------------------
bulkdelete(1): 192 entries deleted...
------------------------------------------------------------
192 Entries have been deleted.
------------------------------------------------------------

Loading the Exported Data Into the Target Directory in Bulk

Now that the duplicate baseDN has been removed from the target 12c directory, you can export the 11g source environment data into the target 12c directory by using the bulkload process.

Do the following on the first target 12c directory host only. All tool execution requires that you set the environment variables for Oracle Internet Directory tools. Environment Variables for Oracle Internet Directory Tools.

  1. Run the following command to check and generate the bulk load:
    bulkload connect="TNS_ENTRY" append="TRUE" check="TRUE" generate="TRUE" restore="TRUE" file="LDIF_FILE"
    Where,
    • TNS_ENTRY is the entry found in ORACLE_INSTANCE/config/tnsnames.ora.
    • LDIF_FILE is the location of the file copied to the first Oracle Internet Directory host in the target 12c environment.
    For example:
    bulkload connect="OIDDB" append="TRUE" check="TRUE" generate="TRUE" restore="TRUE" file="/u01/backup/backup_data.ldif"
    Output example:
    ------------------------------------------------------------
    "oiddb"...
    ------------------------------------------------------------
    This tool can only be executed if you know database user password for OID
    Enter OID Password :: OCI_ODS_SCHEMA_PASSORD
    ...Setting OID server mode to read-modify on "oiddb" node...
    ------------------------------------------------------------
    Checking and Generating Internet Directory data for bulk loading
    ------------------------------------------------------------
    Data generated successfully
    ------------------------------------------------------------

    Note:

    If the above command results in conflicts or errors, you must resolve them before you execute the bulkload loading process. Conflict and error resolution is not in the scope of this document. For more information, see Troubleshooting bulkload Errors in Administering Oracle Internet Directory.

  2. Run the following command to start the bulk loading process:
    bulkload connect="[TNS_ENTRY]" load="TRUE"

    Where TNS_ENTRY is the entry found in ORACLE_INSTANCE/config/tnsnames.ora.

    For example:
    bulkload connect="OIDDB" load="TRUE"

    Output example:

    ------------------------------------------------------------
    "oiddb"...
    ------------------------------------------------------------
    This tool can only be executed if you know database user password for OID
    Enter OID Password :: OCI_ODS_SCHEMA_PASSORD
    ------------------------------------------------------------
    Loading data on "oiddb"
    ------------------------------------------------------------
    attr_store001...
    battr_store001...
    objectclass001...
    attr_store002...
    battr_store002...
    objectclass002...
    battr_store003...
    objectclass003...
    dn...
    ...
    ------------------------------------------------------------
    Data loaded successfully
    ------------------------------------------------------------
    Verifying indexes ...
    ------------------------------------------------------------
    Generating Database Statistics ...
    ------------------------------------------------------------
    ...Setting OID server mode to read-write on "oiddb" node...
    

Starting the Oracle Internet Directory Instances in the Target 12c Environment

You can restart the Oracle Internet Directory instances after completing the bulkload successfully.

Do the following on all Oracle Internet Directory hosts only in the target 12c environment. All tool execution requires that you set the environment variables for Oracle Internet Directory tools. Environment Variables for Oracle Internet Directory Tools.

  1. Run the following command from the ORACLE_HOME/oracle_common/common/bin location to launch the WLST tool:

    ./wlst.sh

  2. Connect to the Administration Server using the following command:
    connect(ADMIN_USERNAME','ADMIN_PASSWORD','t3://ADMIN_HOST:ADMIN_PORT')
    For example:
    connect(weblogic','password','t3://MYHOSTNAME:7001')
  3. Run the following command to start the Oracle Internet Directory instance:
    /base_domain/serverConfig> start('OID_NODE_NAME')

    For example:

    start('oid1')