Databases Reference
In-Depth Information
aBSOLUte pat h S VS. reLat IVe pat h S
some older, non-gnU versions of tar use absolute paths when extracting files. The next line of code shows an
example of specifying the absolute path when creating an archive file:
$ tar -cvf orahome.tar /home/oracle
specifying an absolute path with non-gnU versions of tar can be dangerous. These older versions of tar
restore the contents with the same directories and file names from which they were copied. This means that any
directories and file names that previously existed on disk are overwritten.
When using older versions of tar , it's much safer to use a relative pathname. This example first changes to the
/home directory and then creates an archive of the oracle directory (relative to the current working directory):
$ cd /home
$ tar -cvf orahome.tar oracle
The previous example uses the relative pathname.
You don't have to worry about absolute vs. relative paths on most linux systems. This is because these systems
use the gnU version of tar . This version strips off the forward slash ( / ) and restores files relative to where your
current working directory is located.
Use the man tar command if you're not sure whether you have a gnU version of the tar utility. You can also use
the tar -tvf <tarfile name> command to preview which directories and files are restored to what locations.
Step 2. Attach the Oracle Home
One issue with using a copy of an existing installation to install the Oracle software is that if you later attempt to
upgrade the software, the upgrade process will throw an error and abort. This is because a copied installation isn't
registered in oraInventory . Before you upgrade a set of binaries installed via a copy, you must first register the Oracle
home so that it appears in the inventory.xml file. This is called attaching an 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 (on the server on
which you installed the Oracle binaries from a copy):
$ 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 as the last message in the output, if successful:
'AttachHome' was successful.
 
Search WWH ::




Custom Search