RESOLVED: Cannot determine ORACLE_HOME for sid


#1

My problem is as follows:

I have a db-server running Oracle with four different sids (i have only used numbers to illustrate the length of the sid): 1234, 123456789, 123456789 and 123456789012. These sids are truncated to eight characters (1234, 12345678, 12345678 and 12345678) and defined in tnsnames.ora on the db-server.

From my nagios server i’m remotly checking login and tns listener for each sid on the db-server.
Logged in as nagios user on my db-server running the following commands

check_oracle --login 1234
OK - dummy login connected
check_oracle --tns 1234
OK - reply time 0 msec from 1234

check_oracle --login 12345678
OK - dummy login connected
check_oracle --tns 12345678
OK - reply time 0 msec from 12345678

gives me everything OK

Logged in as nagios user on my nagios server running the following commands

check_nrpe -H db-server -c check_oracle_login -a 1234
OK - dummy login connected
check_nrpe -H db-server -c check_oracle_tns -a 1234
OK - reply time 0 msec from 1234

check_nrpe -H db-server -c check_oracle_login -a 12345678
Cannot determine ORACLE_HOME for sid 12345678
check_nrpe -H db-server -c check_oracle_tns -a 12345678
Cannot determine ORACLE_HOME for sid 12345678

(check_oracle_login and check_oracle_tns are defined in nrpe.cfg on the remote db-server.)

gives a problem with the eight character truncated sids. Or some other problem??

I need some help on this issue… I’ll be grateful for any help offered to me.

thanks.


#2

RESOLVED:

Add the following line to /etc/oratab:

*:/path/to/your/oraclehome/:N

This will work if all the SIDs have the same oracle home.


#3

As I too recently found this problem, Be aware with that solution, that if you goto different versions of Oracle, that this will not always work. I am doing it a little bit more manual, but you should be able to use a -s to specifically select a SID