Oracle 11.2.0.1.0 and 10.2.0.4.0
OL 5.6 x86-64
This kind of comes in the cracks between Oracle and Linux ...
At this shop, any ouput of a cron job that is not redirected is sent by email to the owner of the job. So if I have a crontab entry
* * * * * /home/snuffy/myscript.sh
all stdout and errout gets emailed from "Cron Daemon" to the owner of the crontab.
If the line is
* * * * * /home/snuffy/myscript.sh > /tmp/snuffy.lis
of course the stdout goes to the file, but errout - not being redirected - still gets emailed.
Now here's the weird part, and why I'm posting to the db forum and not the Linux forum.
In my shell script I have this:
sqlplus -s /nolog <<EOF! >>$logfile
-- some sqlpluse commands and sql statements
EOF!
So all of the ouput of sqlplus should be appended to $logfile.
However, if there are any ORA- messages generated (like say 'ORA-00942: table or view does not exist') that still gets emailed by cron daemon, as if it were errout.
But the messages are also being written to $logfile.
I even modified the script to read
sqlplus -s /nolog <<EOF! >>$logfile 2>&1
And the ORA- messages (only) still got the email from cron daemon ....
Color me ... perplexed.