  | | | crontab job loosing the Oracle env settings | crontab job loosing the Oracle env settings 2007-07-24 - By Yoav Givon
Back Hi All
I am trying to create a shell script that will restart the Listener process in case the listener was shutdown unexpectedly .
My shell script will be run successfully once invoked from prompt (logged as oracle) BUT once as a crontab job I am loosing ALL oracle related environment settings (my guess ) .
if my shell script would Just if.. then ... lsnrctl start then in my ORACLE mail message it will say "program can not found .. ) but if I will add the full path to my script , /opt/oracle/prosuct/10.1.0/db_1/bin/lsnrctl start
Then I will get different error message in my mail
LSNRCTL for Linux ....
Message 1070 not found .. No message file for product ... TNS-12560 (See http://TNS-12560.ora-code.com) TNS-00515 (See http://TNS-00515.ora-code.com) message 515 not found
In other words , The shell script does not know how ot get to TNSNAMES.ORA
My theory as of the above two examples is that once the shell script is invoked from within crontab (although the crontab job was created while logged as Oracle )
The whole oracle environment is somehow lost .
QUESTION - Do I have to add something to the crontab job to facilitate the oracle environment ? Have I missed something else here ?
Thank you for your help
Yoav
|
|
 |