Cloning an Oracle Home is a process where you copy the Oracle Home directory from one server (source) to another server (destination) or to a different location on the same server. The goal is often to replicate an Oracle software installation without the need to perform a full installation from scratch. Oracle has different steps based on the version
How to clone Oracle Home in 10g/11g/12c
Prepare steps
1) On the source Create a tar file of the Oracle Home /u001/app/oracle/product/12.1.0/dbhome_1
$cd /u001/app/oracle/product/12.1.0/
$ tar -cvf dbhome_1.tar dbhome_1
2) scp this tar file to the target machine and untar the file
scp dbhome_1.tar LINUX1:/u001/appl/oracle//product/12.1.0
Login to LINUX1
cd /u001/appl/oracle//product/12.1.0
tar -xvf dbhome_1.tar
Clone to target destination
set the Oracle env
export ORACLE_HOME=/u001/appl/oracle//product/12.1.0/dbhome_1 export PATH=/u001/appl/oracle//product/12.1.0/dbhome_1/bin:$PATH cd $ORACLE_HOME/oui/bin /u001/appl/oracle//product/12.1.0/dbhome_1/oui/bin/runInstaller -silent -clone -waitForCompletion -ignoreSysPrereqs ORACLE_HOME="/u001/appl/oracle/product/12.1.0/dbhome_1" ORACLE_BASE="/u001/appl/oracle" "INVENTORY_LOCATION="/u01/appl/oraInventory" -paramFile /u001/appl/oracle/product/12.1.0/dbhome_1/clone/clone_oraparam.ini
The above step takes a while, once the setup is successful switch to the root user and run the following configuration script
/u001/appl/oracle/product/12.1.0/root.sh
How to clone Oracle Home in 19c/23c
The above method does not work in 19c and we will receive the error if we try to execute. Here is the correct method
Prepare steps
1) On the source Create a gold image of the Oracle Home /u001/app/oracle/product/19.1.0/dbhome_1
$ORACLE_HOME/runInstaller -createGoldImage -destinationLocation /u001/app/staging
This will generate a zip file in the directory /u001/app/staging
2) scp this zip file to the target machine
scp <zip file> LINUX1:/u001/appl/oracle//product/19.1.0/dbhome_1
Login to LINUX1
cd /u001/appl/oracle//product/dbhome_1
unzip < zip file>
Clone to target destination
set the Oracle env
export ORACLE_HOME=/u001/appl/oracle/product/19.1.0/dbhome_1 export PATH=/u001/appl/oracle//product/19.1.0/dbhome_1/bin:$PATH cd $ORACLE_HOME ./runInstaller -silent -debug -force \ oracle.install.option=INSTALL_DB_SWONLY \ UNIX_GROUP_NAME=dba \ ORACLE_HOME=/u001/appl/oracle/product/19.1.0/dbhome_1 \ ORACLE_BASE=/u001/appl/oracle \ oracle.install.db.InstallEdition=EE \ oracle.install.db.DBA_GROUP=dba \ oracle.install.db.OPER_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 \ DECLINE_SECURITY_UPDATES=true
As a root user, execute the following script(s):
/u001/appl/oracle/product/19.1.0/dbhome_1/root.sh
Post cloning Steps
- Review and modify the $ORACLE_HOME/network/admin configuration files like “listener.ora”, “tnsnames.ora”, etc., if needed.
- Check Oracle inventory using the command “$ORACLE_HOME/OPatch/opatch lspatches”
- Remove the old environment files appsutil directory, source database initialization parameter files
I hope this post on How to clone Oracle Home in 10g/11g/12c/19c/23c helps you. Please do provide feedback
FAQ about Oracle Home cloning
Question 1: Do the source and the destination path (of the Oracle Home to be cloned) need to be the same?
Answer: The source and the destination path (of the Oracle Home to be cloned) need not be the same. It can be different
Question 2: Are all the changes made by applying one-off patches or PSU or CPU on the source Oracle Home also present after the clone operation?
Answer: Yes, all the changes made by applying one-off patches or PSU or CPU on the source Oracle Home are also present after the clone operation.
Question 3: Can I use the cloned Oracle Home as the source for another cloning operation?
Answer: Yes, you can also use the cloned Oracle Home as the source for another cloning operation. The cloned installation behaves the same as the source installation. For example, the cloned Oracle Home can be removed using OUI or patched using OPatch.
Question 4: Can I clone the Oracle Home across platforms?
Answer: No, cloning across platforms is not possible because the binaries across platforms are different. So you cannot copy the binary from Solaris to Linux
Question 5: Can you clone the Oracle Home across different OS versions?
Answer: Yes, cloning across OS versions is possible provided the Oracle version is certified on the respective OS version.
Related Articles
Hot backup database cloning: This post consists of step-by-step detailed instruction to clone the Oracle database using the Hot backup database cloning method
Cold backup Database Cloning: This post consists of step-by-step detailed instruction to clone the Oracle database using the cold backup database cloning method
How to clone R12.2 Environment: This page provides a step-by-step approach for cloning the R12.2 environment successfully. R12.2 is the latest release of Oracle apps
How to clone R12.1 Environment: This page gives step-by-step instructions to clone the R12.1 environment without issues and errors.
How to Clone Oracle Application Server 10g: check out this post for step-by-step instructions to clone application server 10g.It involves preparing clone, copying, and then cloning