I've been using sqlplus in scripts. Some from the cron run fine. But a new script that I have runs fine when run at command but complains sqlplus not found when run from cron. Any ideas?
Just to see what you have different from your "online" and your "batch" add the following to your script (before any other commnand (other than the !/bin/(your_shell_of_choice))
env>/tmp/mytempenv
set>/tmp/mytempset
and then execute the "env" and "set" commands on your online section and compare.
Put the path you see when echoing $PATH as the user you're running it successfully as interactively as one of the first lines in your script. You might also include explicit export ORACLE_HOME=<your oracle home> and export ORACLE-SID=<sid> in the script too.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.