Once in while I work on systems that are new to me and no one is around to explain the configuration to me. In these cases, I’ve often wanted a way to clearly figure out which running database is using which ORACLE_HOME, so it was fun to see Tanel Poder’s recent posted on how to do this on LINUX and SOLARIS. Here is a quick summary of LINUX and SOLARIS plus HPUX and AIX as well:
Solaris and Linux
$ pgrep -lf _pmon_
12586 ora_pmon_ee10204
ORACLE_SID is ee10204
$ pwdx 12586
12586: /u01/oracle/10.2.0.4/ee1/dbs
ORACLE_HOME is /u01/oracle/10.2.0.4/ee1
HPUX
$ ps -ef | grep pmon
ora1024 25611 1 0 Mar 21 ? 0:24 ora_pmon_itanic10
ORACLE_SID is itanic10
$ pfiles 25611 | grep bin
25611: /opt/ora1024/app/db_1/bin/oracle
ORACLE_HOME is /opt/ora1024/app/db_1
AIX
$ ps -ef | grep pmon
ora1024 262314 1 0 Mar 23 - 0:12 ora_pmon_mercury
ORACLE_SID is mercury
$ ls -l /proc/262314/cwd
lr-x------ 2 ora1024 dba 0 Mar 23 19:31 cwd -> /data/opt/app/product/10.2.0.4/db_1/dbs/
ORACLE_HOME is /data/opt/app/product/10.2.0.4/db_1
Comments