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
How to find the CRS_HOME or clusterware home location
1) As Clusterware Owner
echo $CRS_HOME
2) Using ‘ps’ command in unix
ps -eaf|grep crs
The method 2 will be working , only if the Clusterware background jobs are up. The step 1 will not work , if you are not sure about the clusterware binary owner. In this case we can you another method . This will be working in linux , i have not tested in Solaris. From the terminal issue the following command
$ /etc/init.d/init.crsd |grep ORA_CRS_HOME
ORA_CRS_HOME=/d02/oracrs/testcrs/10.2.0
ORACLE_HOME=$ORA_CRS_HOME
export ORA_CRS_HOME
PIDFILE=$ORA_CRS_HOME/crs/init/$HOST.pid
From this example we can see that the CRS_HOME is =/d02/oracrs/testcrs/10.2.0