TIP 106# : Quick tips on Cloning Oracle

As Oracle clone is one of the quickest way to create new software binaries with all the patches from a source database and it comes handy specially when Oracle software installation media is not available. In this post, I am trying to remind myself and readers some tips about Oracle clone which worth to know:

  • Cloning is not cross platform
  • Clone usually is done in 2 phases - prepare_clone.pl in source and clone.pl in target
  • Clone does take care of inventory and relink so further patches can be applied on the new cloned home
  • For Oracle database and CRS, prepare_clone.pl is not required
  • ORACLE_HOME and ORACLE_HOME_NAME should be specified when clone.pl is run, in 11g, ORACLE_BASE should be specified also
  • If Oracle inventory is not in default location, before running clone.pl, edit cs.properties and add -ignoreSysPrereqs -invPtrLoc <oraInst_path>/oraInst.loc
  • Make sure to run root.sh after clone.pl is completed
  • You may need to create oraInst.loc file manually on target if the file does not exists, to do so, just create a file in default location with inventory_loc=<oraInventory_path>
  • The alternative of running clone.pl is to use runInstaller for cloning, the format would be like this : ./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="" ORACLE_HOME_NAME="" ORACLE_BASE="" (in Windows it would be setup.exe)
  • If the server has more than one perl installed, it is recommended to set PERL5LIB
  • If clone is done on target server which has inventory and the cloned ORACLE_HOME has already been used at somepoint, first ORACLE_HOME needs to be de-attached using this command : ./runInstaller -detachHome ORACLE_HOME= This is why it is recommended to clone in brand new directory to avoid any issue.
  • Clone log in target is created in $ORACLE_HOME/clone/logs
Enjoy cloning!