find Grid Home Location in Oracle

A simple scenario, when you got a RAC installed system, but don’t know path of GRID_HOME. Let’s find out how to getpath of GRID_HOME.

1. When Cluster is up and running: When Cluster ware is up and running then it becomes easy for a remote DBA to find out the GRID_HOME path using below query.

login to system using either root, oracle or gird user and execute.

-bash-4.1$ ps -ef | grep d.bin

oracle   1515      1   0   Mar 30 ?         173:36 /u01/app/11.2.0.3/grid/bin/evmd.bin
oracle   1202      1   0   Mar 30 ?          82:25 /u01/app/11.2.0.3/grid/bin/ocssd.bin
root    892      1   0   Mar 30 ?          46:00 /u01/app/11.2.0.3/grid/bin/ohasd.bin reboot

I have listed few of the process only, From the above list you can easily see “/u01/app/11.2.0.3/grid” is GRID_HOME on this system.

2. When Cluster is not up and Running:

  • Check Profile or bash_profile File:
  • Check oratab file:
  • Ora Inventory Location:

When, above also not work, a remote DBA can look into oraInventory location for installation logs.

-bash-4.1$ cat /var/opt/oracle/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
-bash-4.1$ cd /u01/app/oraInventory
-bash-4.1$ cd logs/
-bash-4.1$ ls *out*
oraInstall2013-03-12_01-49-41PM.out            oraInstall2013-03-12_02-45-12PM.out            oraInstall2013-03-12_02-47-32PM.out             oraInstall2013-03-12_01-49-41PM.out.db08  oraInstall2013-03-12_02-45-12PM.out.db08

Now, execute a grep command for grid on these scrips. like below

-bash-4.1$ cat oraInstall2013-03-12_01-49-41PM.out | grep grid
2. /u01/app/11.2.0.3/grid/root.sh
Execute /u01/app/11.2.0.3/grid/root.sh on the following nodes:
1. /u01/app/11.2.0.3/grid/cfgtoollogs/configToolAllCommands

Leave a comment