Wednesday, June 25, 2025

Upgrade OUD 12cPS4 to OUD 14c

Oracle Unified Directory (OUD) 14c is now available and upgrading has never been easier.  The documentation for upgrade and migration are found at the following links:
From my experience, there are at least four viable upgrade paths, but the most will use one of the following first two options.  These options include:

I. Swing Migration
II. Upgrade In Place
III. Upgrade To New Middleware Home
IV. Sync New Topology

Each option is outlined below.  Before getting into the details, it is important to make clear that it is critical to pre-qualify the migration steps and qualification testing in lower non-production environments before attempting in production.

I. Swing Migration

This migration strategy expands the existing OUD 12cPS4 topology by adding new OUD 14c instances on new or existing infrastructure. The basic workflow looks like the following:

1. Setup new or existing hosts for the new OUD 14c instances

2. Install JDK 21 (or 17) and the OUD 14c software interactively or automated with with response files

2.1 Extract software

cd /opt/ods/poc/sw
tar -zxf /opt/ods/poc/bits/14c/jdk-21_linux-x64_bin.tar.gz
unzip -qo /opt/ods/poc/bits/14c/V1048203-01.zip
unzip -qo /opt/ods/poc/bits/14c/p37376076_141200_Generic.zip


2.2 Make response files for automated OUD 14c installation

cat  /opt/ods/poc/cfg/oraInventory.loc
inventory_loc=/opt/ods/poc/cfg/oraInventory
inst_group=opc

cat  /opt/ods/poc/cfg/oud14c-standalone.rsp
[ENGINE] 
Response File Version=1.0.0.0.0
[GENERIC]
DECLINE_AUTO_UPDATES=true
MOS_USERNAME=
MOS_PASSWORD=<SECURE VALUE>
AUTO_UPDATES_LOCATION=
SOFTWARE_UPDATES_PROXY_SERVER=
SOFTWARE_UPDATES_PROXY_PORT=
SOFTWARE_UPDATES_PROXY_USER=
SOFTWARE_UPDATES_PROXY_PASSWORD=<SECURE VALUE>
ORACLE_HOME=/opt/ods/poc/mw_oud14c
INSTALL_TYPE=Standalone Oracle Unified Directory Server (Managed independently of WebLogic server)


2.3 Install OUD 14c

export JAVA_HOME=/opt/ods/poc/sw/jdk-21.0.6
$JAVA_HOME/bin/java -jar  /opt/ods/poc/sw/fmw_14.1.2.1.0_oud.jar -silent -ignoreSysPrereqs -responseFile  /opt/ods/poc/cfg/oud14c-standalone.rsp -invPtrLoc /opt/ods/poc/cfg/oraInventory.loc


3 Setup OUD instance

export JAVA_HOME=/opt/ods/poc/sw/jdk-21.0.6
export ORACLE_HOME=/opt/ods/poc/mw_oud14c
/opt/ods/poc/mw_oud14c/oud/oud-setup --cli --integration no-integration --instancePath /opt/ods/poc/mw_oud14c/oud3/OUD --adminConnectorPort 3444 --ldapPort 3389 --ldapsPort 3636 --httpAdminConnectorPort 3555 --httpPort disabled --httpsPort 3443 --baseDN dc=example,dc=com --rootUserDN 'cn=Directory Manager' --addBaseEntry --enableStartTLS --useJavaKeystore /opt/ods/poc/cfg/certs/oud1.example.com/oud1.example.com.jks --keyStorePasswordFile /opt/ods/poc/cfg/certs/oud1.example.com/oud1.example.com.pin --certNickname server-cert --hostName oud1.example.com --noPropertiesFile


4. Apply desired configuration to the OUD 14c instance including custom schema, indexing, password policy, ... etc.

cd /opt/ods/poc/mw_oud14c/oud1/OUD/bin
./ldapmodify -Z -X -p 1444 -h oud3.example.com -D "cn=Directory Manager" -j /opt/ods/poc/cfg/...pw -c -f /opt/ods/poc/cfg/custom_schema.ldif
./dsconfig --batchFilePath /opt/ods/poc/cfg/custom_config.batch --hostName oud3.example.com --port 1444 --bindDN "cn=Directory Manager" --bindPasswordFile /opt/ods/poc/cfg/...pw  --trustAll --no-prompt --noPropertiesFile
./stop-ds
./start-ds


5.  Add the OUD 14c instance to the OUD 12c replication topology

cd /opt/ods/poc/mw_oud14c/oud3/OUD/bin
./dsreplication enable --secureReplication1 --secureReplication2 --host1 oud1.example.com --port1 1444 --bindDN1 'cn=Directory Manager' --bindPasswordFile1 /opt/ods/poc/cfg/...pw --bindPasswordFile2 /opt/ods/poc/cfg/...pw --replicationPort1 1989 --host2 oud3.example.com --port2 1444 --bindDN2 'cn=Directory Manager' --replicationPort2 1989 --baseDN dc=example,dc=com --adminUID admin --adminPasswordFile /opt/ods/poc/cfg/...pw --trustAll --noPropertiesFile --no-prompt


6. Initialize the OUD 14c instance with data

Initialization options include initialization over protocol, via binary backup restore, and LDIF file import.

6.1 Initialize over protocol
Initialize the OUD 14c instance on oud3.example.com from the the data of OUD 12cPS4 instance on oud1.example.com

cd /opt/ods/poc/mw_oud14c/oud3/OUD/bin
./dsreplication initialize --hostSource oud1.example.com --portSource 1444 --portProtocolSource auto-detect --hostDestination oud3.example.com --portDestination 1444 --portProtocolDestination auto-detect --baseDN dc=example,dc=com --adminUID admin --adminPasswordFile /opt/ods/poc/cfg/...pw --trustAll --no-prompt


6.2 Initialize from recent binary backup

6.2.1 If you don't already have a backup from an OUD 12cPS4 instance, create one with the backup command.

cd /opt/ods/poc/mw_oud12c/oud1/OUD/bin
./stop-ds
./backup -c -n userRoot --backupDirectory /opt/ods/poc/tmp/backup/userRoot
./start-ds


6.2.2 Copy the backup from the OUD 12cPS4 instance to the new OUD 14c instance

6.2.3 Restore the binary backup to the OUD 14c instance

cd /opt/ods/poc/mw_oud12c/oud1/OUD/bin
./stop-ds
./restore --backupDirectory /opt/ods/poc/tmp/backup/userRoot
./start-ds


6.3 Initialize from recent LDIF export

6.3.1 Export to LDIF file from OUD 12cPS4 instance

cd /opt/ods/poc/mw_oud12c/oud1/OUD/bin
./stop-ds
./export-ldif -c -n userRoot -l /opt/ods/poc/tmp/export.ldif
./start-ds

6.3.2 Copy the exported LDIF file to the OUD 14c host

6.3.3 Initialize the OUD 14c instance from the LDIF file

cd /opt/ods/poc/mw_oud12c/oud1/OUD/bin
./stop-ds
./import-ldif --skipDNValidation --skipSchemaValidation -c -n userRoot -l /opt/ods/poc/tmp/export.ldif
./start-ds

7. Rinse and repeat steps 1-5 until the desired number of OUD 14c instances have been deployed

8. Satisfy functional and performance qualifiers applying client load

9. Introduce load to the OUD 14c instances by either adding the OUD 14c instances to an existing network load balancer virtual IP address (VIP) or setup a new VIP and iterative migrate applications to the new VIP until no more client load exists on the previous VIP.

Important Note: At this point that if you have any issues at all, your rollback strategy is revert the network load balancer VIPs to their previous state where all load goes to OUD 12cPS4 instances.

10. Once all applications are transitioned to OUD 14c, then remove the OUD 12cPS4 instances from the load balancing infrastructure if necessary.  If you had transitioned all instances to the new VIP, you could transition the old DNS name to the new VIP so that if any straggler apps try to use the old name, they will get routed to the proper VIP.

11. The last step is to deinstall the OUD 12cPS4 instances using the OUD deinstall script so that each OUD 12cPS4 instance is properly removed from the OUD replication topology.  Then, once all of the OUD 12cPS4 instances have been deinstalled and cleanly removed from the OUD topology, you can decommission the OUD 12cPS4 infrastructure. 

II. Upgrade In Place

With this migration strategy, you upgrade existing OUD 12c instances in place in the existing middleware home directory. The basic workflow looks like the following:

1. Stop and backup the existing OUD 12cPS4 instance(s)

Important Note: This backup strategy presumes that the backend data and logs reside within the OUD instance directory path.

/opt/ods/poc/mw_oud12c/oud1/OUD/bin/stop-ds
cd /opt/ods/poc/mw_oud12c
tar -czf /opt/ods/poc/oud1.tgz oud1


2. Backup the OUD 12cPS4 middleware home

cd /opt/ods/poc
tar -czf /opt/ods/poc/mw_oud12c.tgz --exclude oud1 mw_oud12c


3. Deinstall the OUD 12cPS4 middleware home

cd /opt/ods/poc/mw_oud12c
./oui/bin/deinstall.sh -silent -distributionName 'Oracle Unified Directory'
rm -fr 
/opt/ods/poc/mw_oud12c


4. Extract JDK 21 (or 17) and OUD 14c

cd /opt/ods/poc/sw
tar -zxf /opt/ods/poc/bits/14c/jdk-21_linux-x64_bin.tar.gz
unzip -qo /opt/ods/poc/bits/14c/V1048203-01.zip
unzip -qo /opt/ods/poc/bits/14c/p37376076_141200_Generic.zip


5.1 Make response files for automated OUD 14c installation

cat  /opt/ods/poc/cfg/oraInventory.loc
inventory_loc=/opt/ods/poc/cfg/oraInventory
inst_group=opc

cat  /opt/ods/poc/cfg/oud14c-standalone.rsp
[ENGINE] 
Response File Version=1.0.0.0.0
[GENERIC]
DECLINE_AUTO_UPDATES=true
MOS_USERNAME=
MOS_PASSWORD=<SECURE VALUE>
AUTO_UPDATES_LOCATION=
SOFTWARE_UPDATES_PROXY_SERVER=
SOFTWARE_UPDATES_PROXY_PORT=
SOFTWARE_UPDATES_PROXY_USER=
SOFTWARE_UPDATES_PROXY_PASSWORD=<SECURE VALUE>
ORACLE_HOME=/opt/ods/poc/mw_oud12c
INSTALL_TYPE=Standalone Oracle Unified Directory Server (Managed independently of WebLogic server)


5.2 Install OUD 14c

export JAVA_HOME=/opt/ods/poc/sw/jdk-21.0.6
$JAVA_HOME/bin/java -jar  /opt/ods/poc/sw/fmw_14.1.2.1.0_oud.jar -silent -ignoreSysPrereqs -responseFile  /opt/ods/poc/cfg/oud14c-standalone.rsp -invPtrLoc /opt/ods/poc/cfg/oraInventory.loc


5.3 Apply patch(es) to OUD 14c

Important Note: Patch 37376076 is not required.  It is just provided for illustrative purposes.

export JAVA_HOME=/opt/ods/poc/sw/jdk-21.0.6
export ORACLE_HOME=/opt/ods/poc/mw_oud12c
cd /opt/ods/poc/sw/37376076
$ORACLE_HOME/OPatch/opatch apply


6. Restore the OUD 12cPS4 instance(s)

cd /opt/ods/poc/mw_oud12c
tar -xzf /opt/ods/poc/oud1.tgz


7. Upgrade the OUD 14c instance scripts to reflect the new JDK path

cd /opt/ods/poc/mw_oud12c
./oud/bin/upgrade-oud-instances --instancePath /opt/ods/poc/mw_oud12c/oud1


8. Upgrade the OUD 14c instance(s)

/opt/ods/poc/mw_oud12c/oud1/OUD/bin/start-ds --upgrade


9. Start the OUD 14c instance(s)

/opt/ods/poc/mw_oud12c/oud1/OUD/bin/start-ds


That completes the demonstration of an in place migration of an OUD instance from OUD 12cPS4 to OUD 14c.

III. Upgrade To New Middleware Home

With this migration strategy, you transition existing OUD 12c instances to a new middleware home (e.g. mw_oud14c) from the existing middleware home directory (e.g. mw_oud12c).  The only benefit of this method is that it may streamline rollback if necessary.  Most customers will either migrate in place or swing to new OUD 14c instances on new infrastructure.  The workflow of this upgrade method is identical to the in place upgrade except using a new middleware home (e.g. mw_oud14c) instead of the existing middleware home (e.g. mw_oud12c).

IV. Sync New Topology

With this migration strategy, you setup a complete independent OUD 14c topology, setup and OUD 14c Directory Integration Platform (DIP) instance, configure bi-directional DIP sync profiles between the one of the OUD 12cPS4 instances and one of the OUD 14c instances to sync data between the OUD 12cPS4 and OUD 14c replication topologies. The work flow is similar to the swing migration with regards to load balancer configuration and rollback methodology.  Once the migration is complete, in addition to de-commissioning the OUD 12cPS4 infrastructure, you de-commission the DIP instance as well.  A detailed example of this migration flow is beyond the scope of this blog post because most customers will use one of the first two approaches. 

I hope that you found this helpful.

Brad