Sunday, January 2, 2011

dbhome script

Recently I was looking for some files when I found out in /usr/local/bin directory file named dbhome. This is original Oracle script (available only for non Windows editions), which greps content of oratab file (usually stored in ./etc directory) and shows parent %ORACLE_HOME% for mentioned SID.

Usage is easy:
dbhome SID
Live example:
[oracle@serverX ~]$ dbhome HAC
/u01/HAC/hacdb/10.2.0

[oracle@serverX ~]$ dbhome HACT
/u01/HACT/hactdb/10.2.0

[oracle@serverX ~]$ dbhome HLPD
/u01/HLPD/hlpddb/10.2.0

The End

Even they exists, ASM (and CRS) are not real Oracle databases (regardless they usually have own Oracle home) their values are not stored in oratab so they cannot be queried with this script.
[oracle@serverX ~]$ dbhome ASM
/home/oracle

Cheers!

1 comment: