exit unix after sqlerror in procedure
Can anybody tell me, how it works to exit the UNIX Script after ANY SQLERROR has occured in my procedure??
my unix script executes a few procedures,
but how can i pass the error code to an unix variable and exit the unix script, if any oracle error occured?
now - just for testing - i got the error (when i run the script with the -x command - ORA-01536 space quota exceeded -
sqlplus -s <<EOF1
set serveroutput on feedback off verify off heading off echo off
whenever sqlerror exit sql.sqlcode;
i got the errorcode on unix like 127,
I check the status, if there has any error occured within my procedure, it doesn't work.
if [ $status -eq 0 ]; then
echo "error code"
#go on within the unix script
Because if there is any "ORACLE error", the script must exit and display an error message.