How to clone Oracle Binaries

DBAs sometimes install Oracle software by using a utility such as tar to copy an existing installation of the Oracle binaries to a different server . This approach is fast and simple . This technique allows DBAs to easily install the Oracle software on multiple servers, while ensuring that each installation is identical.

Installing Oracle with an existing copy of the binaries is a two-part process:

1. Copy the binaries

2. Attach the Oracle home.

 Step 1. Copy the Binaries

You can use any OS copy utility to perform this step.

 $ echo $ORACLE_HOME
/u01/app/oracle/product/12.1.0.1/db_1
Now the tar utility copies every file and subdirectory in the db_1 directory:
$ cd $ORACLE_HOME
$ cd ..
$ tar -cvf orahome-db2server.tar db_1

Now, copy the orahome-db2server.tar file to the db2server on which you want to install the Oracle software.

tar file is copied to the /u01/app/oracle/product/12.1.0.1 directory on db2server. The tar file is extracted there and creates a db_1 directory as part of the extract:

$ cd /u01/app/oracle/product/12.1.0.1
 Make sure you have 4 GB of free space.
 Next, extract the files:
$ tar -xvf orahome-db2server.tar

When the tar command completes, the directory db_1 should be created.

There is one strong command in linux to tar a directory, send to the remote server and extract it.

 

 $ tar -cvf - db_1 | ssh db2server "/u01/app/oracle/product/12.1.0.1; tar -xvf -"

 

Step 2. Attach the Oracle Home

When you try to upgrade the clone oracle home, the upgrade process will throw an error and abort

To resolve this, you need to attach the oracle home.

To attach an Oracle home, you need to know the location of your oraInst.loc file on your server. On Linux servers this file is usually located in the /etc directory. On Solaris this file can generally be found in the /var/opt/ oracle directory.

After you’ve located your oraInst.loc file, navigate to the ORACLE_HOME/oui/bin directory .

 $ cd $ORACLE_HOME/oui/bin

Now, attach the Oracle home by running the runInstaller utility, as shown:

$ ./runInstaller -silent -attachHome -invPtrLoc /etc/oraInst.loc \ ORACLE_HOME="/u01/app/oracle/product/12.1.0.1/db_1" ORACLE_HOME_NAME="ONEW"

You should see this  message, if successful:

'AttachHome' was successful.

 

About Sher khan

Senior Oracle DBA, Oracle 10g and 11g OCE and OCS, Oracle 11g OPN certified Specialist, OCP Certified in Oracle 9i,10g and 11g. I am working in Oracle technology since 2004. Currently working in U.A.E Email: sher487@hotmail.com
This entry was posted in Database administration. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

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