6 Performing an Out-of-Place Upgrade of Oracle Internet Directory
When upgrading Oracle Internet Directory, you migrate your existing directory data from an 12c (12.2.1.4.0) Oracle Internet Directory instance to a newly installed 14c (14.1.2.1.0) 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 12c (12.2.1.4.0) Oracle Internet Directory applications in the source environment and import the data into the 14c (14.1.2.1.0) Oracle Internet Directory applications:
- Pre-Upgrade Assessment
- Set the Source Directory to Read-Only Mode
- Exporting the Required Data from the Source Directory
- Loading the Data
Parent topic: Out-of-Place Upgrade of Oracle Internet Directory
Pre-Upgrade Assessment
The pre-upgrade assessment prepares you to export the data from the 12c (12.2.1.4.0) OID application's source environment and import the data into the 14c (14.1.2.1.0) OID application's target environment.
You must ensure that the following assessment is complete before you perform the 12c (12.2.1.4.0) to 14c (14.1.2.1.0) 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 12c (12.2.1.4.0) environment and the target 14c (14.1.2.1.0) environment are running.
For information, see Validating that the OID1 Instances are Running.
Parent topic: Pre-Upgrade Assessment
Environment Variables for Oracle Internet Directory Tools
Before executing any of the Oracle Internet Directory tools, you must set the environment variables.
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.
Parent topic: Pre-Upgrade Assessment
Set the Source Directory to Read-Only Mode
Before the directory information is exported from the source 12c (12.2.1.4.0)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 12c (12.2.1.4.0) 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.-
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 14c (14.1.2.1.0) environment. -
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 12c (12.2.1.4.0) directory is the data that does not exist in the target 14c (14.1.2.1.0) 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
.
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.-
Run the following command:
ldifwrite connect="TNS_ENTRY" basedn="YOUR_BASEDN" ldiffile="BASEDN_LDIF_FILE"
Where,TNS_ENTRY
is the entry found inORACLE_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". ------------------------------------------------------------
-
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 inORACLE_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" ------------------------------------------------------------
- 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:
- Copying the Exported Data File to the Target Environment Directory Host
- Stopping all Oracle Internet Directory Instances in the Target 14c Environment
- Deleting the Current baseDN Data in Bulk
- Loading the Exported Data Into the Target Directory in Bulk
- Starting the Oracle Internet Directory Instances in the Target 14c Environment
Copying 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 14c (14.1.2.1.0) 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.
Parent topic: Loading the Data
Stopping all Oracle Internet Directory Instances in the Target 14c Environment
Before executing the bulkdelete and bulkload, you should shutdown the Oracle Internet Directory instances in the target 14c (14.1.2.1.0) 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.
-
Run the following command from the
ORACLE_HOME/oracle_common/common/bin
location to launch the WLST tool:./wlst.sh
-
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')
-
Run the following command to shutdown the Oracle Internet Directory instance:
/base_domain/serverConfig> shutdown('OID_NODE_NAME')
For example:
shutdown('oid1')
Parent topic: Loading the Data
Deleting the Current baseDN Data in Bulk
Since the directory in the target 14c (14.1.2.1.0) environment is created with a baseDN that is most likely a duplicate name, you should remove the duplicate baseDN from the 14c (14.1.2.1.0) environment before you execute the bulkload. This deletion ensures that there are no conflicts with the bulkload.
Do the following on the first target 14c (14.1.2.1.0) 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.
bulkdelete connect=TNS_ENTRY basedn="YOUR_BASEDN" cleandb="TRUE" verbose="TRUE"
TNS_ENTRY
is the entry found inORACLE_INSTANCE/config/tnsnames.ora
.YOUR_BASEDN
is the baseDN for the OAM config store.
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 :: xxxx
------------------------------------------------------------
Reading entries under BaseDN "dc=com"...
------------------------------------------------------------
bulkdelete(1): 192 entries deleted...
------------------------------------------------------------
192 Entries have been deleted.
------------------------------------------------------------
Parent topic: Loading the Data
Loading the Exported Data Into the Target Directory in Bulk
Now that the duplicate baseDN has been removed from the target 14c (14.1.2.1.0) directory, you can export the 12c (12.2.1.4.0) source environment data into the target 14c (14.1.2.1.0) directory by using the bulkload process.
Do the following on the first target 14c (14.1.2.1.0) 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.
-
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 inORACLE_INSTANCE/config/tnsnames.ora
.LDIF_FILE
is the location of the file copied to the first Oracle Internet Directory host in the target 14c (14.1.2.1.0) 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 :: xxxx ...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.
-
Run the following command to start the bulk loading process:
bulkload connect="[TNS_ENTRY]" load="TRUE"
Where
TNS_ENTRY
is the entry found inORACLE_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 :: xxxx ------------------------------------------------------------ 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...
Parent topic: Loading the Data
Starting the Oracle Internet Directory Instances in the Target 14c 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 14c (14.1.2.1.0) environment. All tool execution requires that you set the environment variables for Oracle Internet Directory tools. Environment Variables for Oracle Internet Directory Tools.
-
Run the following command from the
ORACLE_HOME/oracle_common/common/bin
location to launch the WLST tool:./wlst.sh
-
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')
-
Run the following command to start the Oracle Internet Directory instance:
/base_domain/serverConfig> start('OID_NODE_NAME')
For example:
start('oid1')
Parent topic: Loading the Data