I find that’s a good idea to have a different ORACLE_HOME when it comes to patching or maybe you want to have the same oracle home setup in a lower environment than PROD. The cloning comes in very handy rather doing the whole installation (including whatever patches have been deployed in the past) again.
One may start thinking that can be achieved with clone.pl utility, but as Oracle stated, this utility is deprecated starting with 19c. Now we have “golden image” concept.
Below I will clone the existing ORACLE_HOME to the same server but different path. This strategy is very good if you want to have minimum downtime for patching.
Let’s consider the following setup:
Actual ORACLE_HOME = /u01/app/oracle/product/19.0.0/dbhome_1 New ORACLE_HOME = /u01/app/oracle/product/19.0.0/dbhome_2
- Create GOLDEN IMAGE
--- create the folder for golden image [oracle@ol8-19-dg1 u01]$ mkdir -p /u01/19.3_goldimage [oracle@ol8-19-dg1 u01]$ echo $ORACLE_HOME /u01/app/oracle/product/19.0.0/dbhome_1 --- create the golden image [oracle@ol8-19-dg1 u01]$ $ORACLE_HOME/runInstaller -createGoldImage -destinationLocation /u01/19.3_goldimage -silent Launching Oracle Database Setup Wizard... Successfully Setup Software. Gold Image location: /u01/19.3_goldimage/db_home_2021-06-16_09-13-13AM.zip
2. Unzip the golden image to the new ORACLE_HOME
[oracle@ol8-19-dg1 u01]$ mkdir -p /u01/app/oracle/product/19.0.0/dbhome_2 [oracle@ol8-19-dg1 u01]$ cd /u01/app/oracle/product/19.0.0/dbhome_2 [oracle@ol8-19-dg1 dbhome_2]$ unzip -oq /u01/19.3_goldimage/db_home_2021-06-16_09-13-13AM.zip
3. Proceed with installation
[oracle@ol8-19-dg1 dbhome_2]$ export CV_ASSUME_DISTID=OEL7.6 [oracle@ol8-19-dg1 dbhome_2]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_2 [oracle@ol8-19-dg1 dbhome_2]$ [oracle@ol8-19-dg1 dbhome_2]$ [oracle@ol8-19-dg1 dbhome_2]$ [oracle@ol8-19-dg1 dbhome_2]$ echo $ORACLE_HOME /u01/app/oracle/product/19.0.0/dbhome_2 [oracle@ol8-19-dg1 dbhome_2]$ ${ORACLE_HOME}/runInstaller -ignorePrereq -waitforcompletion -silent \ -responseFile ${ORACLE_HOME}/install/response/db_install.rsp \ oracle.install.option=INSTALL_DB_SWONLY \ ORACLE_HOSTNAME=${ORACLE_HOSTNAME} \ UNIX_GROUP_NAME=oinstall \ INVENTORY_LOCATION=${ORA_INVENTORY} \ SELECTED_LANGUAGES=${ORA_LANGUAGES} \ ORACLE_HOME=${ORACLE_HOME} \ ORACLE_BASE=${ORACLE_BASE} \ oracle.install.db.InstallEdition=EE \ oracle.install.db.OSDBA_GROUP=dba \ oracle.install.db.OSBACKUPDBA_GROUP=dba \ oracle.install.db.OSDGDBA_GROUP=dba \ oracle.install.db.OSKMDBA_GROUP=dba \ oracle.install.db.OSRACDBA_GROUP=dba \ SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \ DECLINE_SECURITY_UPDATES=true Launching Oracle Database Setup Wizard... [WARNING] [INS-13014] Target environment does not meet some optional requirements. CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/InstallActions2021-06-16_10-26-20AM/installActions2021-06-16_10-26-20AM.log ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/InstallActions2021-06-16_10-26-20AM/installActions2021-06-16_10-26-20AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually. The response file for this session can be found at: /u01/app/oracle/product/19.0.0/dbhome_2/install/response/db_2021-06-16_10-26-20AM.rsp You can find the log of this install session at: /u01/app/oraInventory/logs/InstallActions2021-06-16_10-26-20AM/installActions2021-06-16_10-26-20AM.log As a root user, execute the following script(s): 1. /u01/app/oracle/product/19.0.0/dbhome_2/root.sh Execute /u01/app/oracle/product/19.0.0/dbhome_2/root.sh on the following nodes: [ol8-19-dg1] Successfully Setup Software with warning(s). [oracle@ol8-19-dg1 dbhome_2]$
3. Execute root.sh script from the new ORACLE_HOME
[root@ol8-19-dg1 ~]# /u01/app/oracle/product/19.0.0/dbhome_2/root.sh Check /u01/app/oracle/product/19.0.0/dbhome_2/install/root_ol8-19-dg1.local_2021-06-16_10-28-28-680868456.log for the output of root script [root@ol8-19-dg1 ~]#
That’s all.
Pingback: Rolling Database Upgrade from 19.3.0.0 to 19.11.0.0 Using Transient Logical Standby – Another Oracle blog