I have a Oracle JOB that runs a executable (bash script).. This scripts runs itself SQLPLUS which runs a PACKAGE
Check this
function run_pkg_load_svr() {
if [ "$1" != "" ] && [ "$2" != "" ];
then
sqlplus -l -s $1/$2 <<EOF
WHENEVER SQLERROR EXIT 99;
WHENEVER OSERROR EXIT 88;
BEGIN
PKG_LOAD_SVR.SP_MAIN();
END;
/
EOF
pkg_retcode=$?
echo $DATE_LOG >> upload.log
echo "PKG EXIT CODE: " $pkg_retcode >> upload.log
fi
}
SO, if I run the JOB, its exit code (PKG) is 1
But, If I run manually the package or the script, it works
STATUS is SUCCEEDED in log events
How is possibile to have such a problem?
In addition, when SP_MAIN starts I populate also a log_table.. even that doesn't work