Clone ORACLE_HOME before installation of One-Off Patch

clone Kopie

We received a task from the quality department they need to test a new One-Off Patch in the test environment but we should not patch the actual installed version on this machine.

What could be a solution?

Often DBA’s install in this situation the whole Oracle Software stack from scratch and afterwards they patch this environment. But this could be very time consuming if you have to install a few bundle patches and some One-Off Patches.

We solve this problem by cloning the ORACLE_HOME and it works very good.

The environment is a two node RAC Cluster based on ASM with Grid & Oracle software installed.

My Oracle Support: Doc ID 1221705.1 Cloning An Existing Oracle 11g Release 2

the steps are

as root user start a copy

cp -Rp /u01/app/oracle/product/ /u01/app/oracle/product/
as oracle user set the correct environment and start the Installer

cd $ORACLE_HOME/oui/bin

./runInstaller -detachHome ORACLE_HOME="/u01/app/oracle/product/"

cd $ORACLE_HOME/clone/bin

Start the perl script for cloning

perl ORACLE_HOME="/u01/app/oracle/product/" ORACLE_HOME_NAME="OraDb11g_home3" ORACLE_BASE="/u01/app/oracle" OSDBA_GROUP=oinstall OSOPER_GROUP=oinstall

as root user start the script


final steps

check the log files

create the new diag directories

/u01/app/oracle/product/ basedir="/u01/app/oracle" oraclehome="/u01/app/oracle/product/"

Set the GRID environment and change the listener.ora for. ORACLE_HOME

lsnrctl reload listener

modify the “/etc/oratab”

While using RAC check the linked Oracle options Doc ID 948061.1

cd $ORACLE_HOME/rdbms/lib
make -f rac_on ioracle
make -f ipc_rds ioracle

Now modify the database home

srvctl modify database -d tdb5o_s1 -o /u01/app/oracle/product/

srvctl start database -d tdb5o_s1

So the setup of the „new“ ORACLE_HOME is ready. Start with the installation of the One-Off Patch in rolling manner. (rolling while it is a RAC environment and the Patch is rolling installable.)


As you see it is very easy to setup a second ORACLE_HOME for testing purposes.

If your One-Off Patch also updates the database via SQL Script use Flashback Database to set an guaranteed restore point before starting with the patching task.

After testing the One-Off Patch you do a flashback database and it is the same software level as before installing the patch.