Sybrand Bakker <go********@sybrandb.demon.nl> wrote
He wants to know *in the script* whether his procedure succeeded., not
by looking at log files. Your solution doesn't work, so why contradict
me with a non-working solution where my solution does work?
Exactly.
In addition you can also declare a bind variable in SQL*Plus and set
it in anon PL/SQL blocks in the script (kind of like a process status
code). Then terminate the script with the EXIT command using the bind
variable as parameter.
Also, the OP should note that the exitcode in Unix is a byte, while
the actual exitcode in SQL*Plus (especially when using SQL%SQLCODE to
return ORA error numbers) is two bytes. Thus you cannot determine the
actual Oracle error code in the Unix script by using the exitcode (in
that case you will need to grep the spoolfile).
--
Billy