Clone Oracle Homes

ORACLE RDBMS HOME:

1. On target, move to parent directory of the oracle home

cd /u01/app/oracle/product

2. Create a compression file of the oracle home. The -p preserves the permissions

tar -pcvf 11202.tar 11.2.0.2

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.

CLONE.PL
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/11.2.0.2/clone/bin/clone.pl ORACLE_HOME=”/u01/app/oracle/product/11.2.0.2″ 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.

RUNINSTLLER
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/11.2.0.2” “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/11.2.0.2/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.

Advertisements

Tagged:

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: