ORACLE RDBMS HOME:
1. On target, move to parent directory of the oracle home
2. Create a compression file of the oracle home. The -p preserves the permissions
tar -pcvf 11202.tar 18.104.22.168
3. Move the tarball to the destination
scp -p 11202.tar oracle@destination:/u01/app/oracle/product
4. Uncompress the tarball
tar -xvf 11202.tar
5. There’s two methods to actual clone the home. The first one, clone.pl, makes use of perl and doesn’t require the display to be set. The second method utilizes the runInstaller and does require the display to be set. The clone.pl script is my preferred method for cloning because it doesn’t require the display to be set and there’s no options that I need to remember. But both work.
a. Perl should be within your path. If not you can locate it usually under the oracle home $ORACLE_HOME/perl
b. the clone script, clone.pl is located under the oracle home as well $ORACLE_HOME/clone/bin
c. the script takes in the arguments of the oracle home, oracle base and the oracle home name.
perl /u01/app/oracle/product/22.214.171.124/clone/bin/clone.pl ORACLE_HOME=”/u01/app/oracle/product/126.96.36.199″ ORACLE_BAESE=”/u01/app/oracle” ORACLE_HOME_NAME=”11202_HOME”
d. the installer will be initiated. At the end you will be provided the path of the orainstroot.sh and root.sh which must be ran as root. The first script orainstroot.sh registers the oracle home with the inventory. The second script sets necessary variables and permissions. Both scripts run in a matter of seconds.
a. runInstaller requires that the display be set as if you were running an normal installation
b. This script is located under the oui directory within the oracle home.
./runInstaller -silent -clone -waitForCompletion “ORACLE_HOME=/u01/app/oracle/product/188.8.131.52” “ORACLE_HOME_NAME=11202_Home” -noConfig -nowait
c. Once complete you will be provided with the paths to run the .orainstroot.sh as well as the root.sh
One caveat, if this cloned installation will reside on a host where an existing installation resides and you do not wish to use the central inventory you can set a different location. Modify the $ORACLE_HOME/oraInst.loc with the location of the inventory you desire along with the group. When call the ./runInstaller utilize -invPrvtLoc followed by the path of the oraInst.loc file. Ex. -invPrvtLoc “/u01/app/oracle/product/184.108.40.206/oraInst.loc” . If you are using the clone.pl method you will need to edit the config file under the bat directory to include this option.