What is ORACLE_HOME_NAME and How to Find it ?

What is ORACLE_HOME_NAME ?

 Each Oracle S/W is given a unique name at time of Database installation which is called as Oracle_home_name and the path at which S/W is installed is known as Oracle_home_Path.For a DBA it's necessary to know Database Oracle Home Name and it path.

3 Ways to Find ORACLE_HOME_NAME

The ORACLE_HOME_NAME is the name of the ORACLE_HOME which was given when the base release is installed (for example, database releases 10.2.0.1 or 11.1.0.6)

1. Using Opatch Lsinventory

Execute the command "opatch lsinventory -all"

Here is an example:

$[test01]> opatch lsinventory -all

-bash: opatch: command not found

If you found above message, then follow these steps:
$[test01] > cd $ORACLE_HOME/ OPatch
$[test01]  /opt/app/oracle/product/11.2.0_ee/OPatch>  ./opatch lsinventory   -all

Invoking OPatch 11.1.0.6.6
Oracle Interim Patch Installer version 11.1.0.6.6
Copyright (c) 2009, Oracle Corporation.  All rights reserved.
Oracle Home       : /opt/app/oracle/product/11.2.0_ee
Central Inventory : /opt/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.1.0.6.6
OUI version       : 11.2.0.1.0
OUI location      : /opt/app/oracle/product/11.2.0_ee/oui
Log file location : /opt/app/oracle/product/11.2.0_ee/cfgtoollogs/opatch/opatch2011-05-23_05-16-12AM.log
Patch history file: /opt/app/oracle/product/11.2.0_ee/cfgtoollogs/opatch/opatch_history.txt
Lsinventory Output file location : /opt/app/oracle/product/11.2.0_ee/cfgtoollogs/opatch/lsinv/lsinventory2011-05-23_05-16-12AM.txt

--------------------------------------------------------------------------------
List of Oracle Homes:

  Name                                  Location
  OraDb11g_home1         /opt/app/oracle/product/11.2.0_ee

Installed Top-level Products (1):
Oracle Database 11g                                                  11.2.0.1.0
There are 1 products installed in this Oracle Home.
--------------------------------------------------------------------------------
OPatch succeeded.

Here Oracle_home_name and it's path is  OraDb11g_home1 and /opt/app/oracle/product/11.2.0_ee

2. By Invoking RunInstaller

Invoke the runInstaller inside $ORACLE_HOME/oui/bin

[oracle@]$ cd $ORACLE_HOME/oui/bin

[oracle@]$ ./runInstaller


Select "Installed Products"

Next page will be inventory having two tabs Contents and Environment


Contents

In the Contents tab, products (ORACLE_HOME_NAME) installed will be displayed.Put a check mark on the ORACLE_HOME_NAME and its location will be displayed

Environment

In Environment tab, installed ORACLE_HOME_NAME along with Home Path will be displayed.

3. Reading through oraInst.loc

Locate the oraInst.loc file and hence the location of central inventory
[oracle@database bin]$ locate oraInst.loc
/etc/oraInst.loc
/etc/oracle/grid/oraInst.loc
/etc/oracle/oracle/oraInst.loc
/etc/oracle/oracle/database.example.com_orcl/oraInst.loc
/etc/oracle/oracle/localhost_orcl/oraInst.loc

[oracle@database bin]$ cat /etc/oracle/oracle/oraInst.loc
#Oracle Installer Location File Location
#Thu Oct 21 16:12:34 PDT 2010
inst_group=oracle
inventory_loc=/etc/oraInventory

[oracle@database bin]$ cd /etc/oraInventory/ContentsXML

[oracle@database ContentsXML]$ cat inventory.xml
   11.2.0.2.0
   2.1.0.6.0
HOME NAME="OraDb11g_home1" LOC="/etc/oracle/oracle" TYPE="O" IDX="2"/>

The ORACLE_HOME_NAME is mentioned against the location of ORACLE_HOME

Difference between ORLACE_HOME_NAME & ORACLE_HOME: ORACLE_HOME is the physical path where oracle is installed like ‘/opt/oracle/product/10.2.0.4/db_1’,  while ORACLE_HOME_NAME is the name given to  that installation like ‘OraDB10g_Home’.  It’s possible to have more than one ORACLE_HOME and ORACLE_HOME_NAME provided having different path and name respectively.

DBA can also find out GRID_HOME Path.using same ways.

3 comments:

  1. nice info, thank you

    ReplyDelete
  2. this sites excellent now i have bookmarked this page and here after i will regularly check for updates. thanks for those brilliants who share their knowledge in this site

    ReplyDelete
    Replies
    1. Chandran Sankaran, Thanks for your appreciation

      Delete