DB: Oracle Home Cloning


To clone an existing Oracle_home, for example to move it from a DBsystem or DBcs service platform to a compute system located on a VM:

On the source system, stop all services then, for example:

zip -r dbhome11204.zip /u01/app/oracle/product/11.2.0.4/dbhome_1

 

On the target system, create the target ORACLE_HOME directory, transfer then unzip the zip file

mkdir -p /u01/app/oracle/product/11.2.0.4/dbhome_1
chown -R oracle:dba /u01/app/oracle
unzip -d / dbhome11204.zip

 

Then configure the ORACLE_HOME on the target system:

export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome_1
cd $ORACLE_HOME/clone/bin
$ORACLE_HOME/perl/bin/perl clone.pl ORACLE_BASE="/u01/app/oracle" ORACLE_HOME="/u01/app/oracle/product/11.2.0.4/dbhome_1"
OSDBA_GROUP=dba OSOPER_GROUP=asmoper -defaultHomeName

 

Example with 12c, starting with a detach

export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_4
$ORACLE_HOME/oui/bin/runInstaller -silent -local -cfs -detachHome ORACLE_HOME="/u01/app/oracle/product/12.1.0.2/dbhome_4"

export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_4
cd $ORACLE_HOME/clone/bin
$ORACLE_HOME/perl/bin/perl clone.pl ORACLE_BASE="/u01/app/oracle" ORACLE_HOME="/u01/app/oracle/product/12.1.0.2/dbhome_4" OSDBA_GROUP=dba OSOPER_GROUP=asmoper -defaultHomeName

 

if the ORACLE_HOME is intended to replace an existing one, its value can be reuse as follow:

$ORACLE_HOME/perl/bin/perl clone.pl ORACLE_BASE="/u02/app/oracle" ORACLE_HOME="/u02/app/oracle/product/12.1.0/dbhome_4" OSDBA_GROUP=dba OSOPER_GROUP=racoper ORACLE_HOME_NAME=OraHome2

 

Optionally run the chopt utility to add a database option or relink the executable with the rac option:

make -f ins_rdbms.ml rac_on
make -f ins_rdbms.mk ioracle