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/18.104.22.168/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/22.214.171.124 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/126.96.36.199 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/188.8.131.52; 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/184.108.40.206/db_1" ORACLE_HOME_NAME="ONEW"
You should see this message, if successful:
'AttachHome' was successful.