Java Mailing List Archive

http://www.dba.5341.com/

Home » Home (12/2007) » suse oracle »

[suse-oracle] crontab job loosing the Oracle env settings

Givon, Yoav

2007-07-24

Replies:

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
TNS-00515 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















©2008 dba.5341.com - Jax Systems, LLC, U.S.A.