Hello Sami,
Check the environment variables.. such as ORACLE_HOME, LD_LIBRARY_PATH, and just PATH.. Are they set .. when you execute from CRON ? You will have them when you execute from unix login.
Hope this helps.
Nikunj
From: Oracle DBA <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To:
Title: RE: SQLPLUS with cronjob is giving problem
Dear Sami,
As a matter of fact whatever environ. values are set in your .profile are not in operation through a crontab process.
To deal with this issue we do something that I have seen others do as well. We basically create
Hopefully, you've read the fine manual and, therefore, know that
.profile, .kshrc and alike are not executed, so you don't have
ORACLE_HOME, ORACLE_SID and alike?
--
Mladen Gogala
Oracle DBA
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Oracle
Title: RE: SQLPLUS with cronjob is giving problem
oops ... someone forgot to run
. ./.profile in the sh file ...
Raj
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email
Sami,
You need to set your Oracle Home inside your shell script before you run
SqlPlus. Cron runs as a syetm user, not as your local Oracle user - the
user you log in with.
You could simple add . $HOME/.profile right before your sqlplus
statement, or set your ORACLE_HOME environmental. Type
I encountered this before and it turned out that I had to add the Oracle
environment variables to the shell script. It worked fine when I was
already logged in because my environment variables were already set
through .login or .profile. Add it to your shell script.
-Original Message-