How to clone an Oracle Home in 19c

How to clone an Oracle Home in 19c

In Oracle 19c the way that we clone an Oracle Home has changed. Before you had to zip or tar the original ORACLE_HOME , untar to the desired location and use the script clone.pl. So it you try to use it in 19c you will get the message below:

[oracle@reneace01 ]$ /u01/app/oracle/product/19.0.0.0/dbhome_2/perl/bin/perl  /u01/app/oracle/product/19.0.0.0/dbhome_2/clone/bin/clone.pl  \
> ORACLE_BASE=/u01/app/oracle \
> ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_2 \
> ORACLE_HOME_NAME=db_19 \
> OSDBA_GROUP=dba \
> OSOPER_GROUP=dba

[INFO] [INS-32183] Use of clone.pl is deprecated in this release. Clone operation is equivalent to performing a Software Only installation from the image.
You must use /u01/app/oracle/product/19.0.0.0/dbhome_2/runInstaller script available to perform the Software Only install. For more details on image based installation, refer to help documentation.

The first thing I do, is to gather the ownership data of the current ORACLE_HOME. This is so that the new ORACLE_HOME groups match the old ORACLE_HOME. It will not be needed in some cases, but for some it will.

 
[oracle@reneace01 ]$ cd $ORACLE_HOME/rdbms/lib/
cat config.c | grep define
/*  SS_DBA_GRP defines the UNIX group ID for sqldba adminstrative access.  */
 define SS_DBA_GRP "dba"
 define SS_OPER_GRP "dba"
 define SS_ASM_GRP ""
 define SS_BKP_GRP "dba"
 define SS_DGD_GRP "dba"
 define SS_KMT_GRP "dba"
 define SS_RAC_GRP "dba"

What we do now in Oracle 19c is to create a gold image to a backup location

[oracle@reneace01 ]$ echo $ORACLE_HOME
/u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@reneace01 ]$ $ORACLE_HOME/runInstaller -silent  -createGoldImage -destinationLocation /u01/software/19c_dbhome
Launching Oracle Database Setup Wizard...

Successfully Setup Software.
Gold Image location: /u01/software/19c_dbhome/db_home_2020-03-23_03-28-40PM.zip

Once you have created a gold image, you now unzip it to your new ORACLE_HOME

[oracle@reneace01 ]$ unzip -q /u01/software/19c_dbhome/db_home_2020-03-23_03-28-40PM.zip -d /u01/app/oracle/product/19.0.0.0/dbhome_2

Once you have unzipped the golden image, you can now install using runInstaller 

[oracle@reneace01 ]$ unset ORACLE_HOME ORACLE_SID ORACLE_RSID ORACLE_UNQNAME ORACLE_BASE

[oracle@reneace01 ]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_2
[oracle@reneace01 ]$ export ORACLE_HOSTNAME=reneace01
[oracle@reneace01 ]$ export ORA_INVENTORY=/u01/app/oraInventory
[oracle@reneace01 ]$ export NODE1_HOSTNAME=reneace01
[oracle@reneace01 ]$ export NODE2_HOSTNAME=reneace02
[oracle@reneace01 ]$ export ORACLE_BASE=/u01/app/oracle

[oracle@reneace01 ]$ ${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=en \
ORACLE_HOME=${ORACLE_HOME} \
ORACLE_BASE=${ORACLE_BASE} \
oracle.install.db.InstallEdition=EE \
oracle.install.db.OSDBA_GROUP=dba \
oracle.install.db.OSOPER_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 \
oracle.install.db.CLUSTER_NODES=${NODE1_HOSTNAME},${NODE2_HOSTNAME} \
oracle.install.db.isRACOneInstall=false \
oracle.install.db.rac.serverpoolCardinality=0 \
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE \
oracle.install.db.ConfigureAsContainerDB=false \
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
DECLINE_SECURITY_UPDATES=true

Launching Oracle Database Setup Wizard...

The response file for this session can be found at:
/u01/app/oracle/product/19.0.0.0/dbhome_2/install/response/db_2019-12-09_09-46-11AM.rsp

You can find the log of this install session at:
/u01/app/oraInventory/logs/InstallActions2019-12-09_09-46-11AM/installActions2019-12-09_09-46-11AM.log

As a root user, execute the following script(s):
1. /u01/app/oracle/product/19.0.0.0/dbhome_2/root.sh

Execute /u01/app/oracle/product/19.0.0.0/dbhome_2/root.sh on the following nodes:
[reneace01, reneace02]

Successfully Setup Software.

As root

[root@reneace01 ~]# /u01/app/oracle/product/19.0.0.0/dbhome_2/dbhome_1/root.sh
Check /u01/app/oracle/product/19.0.0.0/dbhome_2/install/root_reneace01.2019-12-09_09-51-28-327627730.log for the output of root script
[root@reneace02 ~]# /u01/app/oracle/product/19.0.0.0/dbhome_2/root.sh
Check /u01/app/oracle/product/19.0.0.0/dbhome_2/install/root_reneace02.2019-12-09_09-52-10-757626970.log for the output of root script

As you can see , it is different as to how we use to clone in previous versions, but by no means more complex. 

Comments

comments

Rene Antunez
antunez.rene@gmail.com
1 Comment

Leave a Reply