Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Status error in a Shell script UNIX
On Wed, 1 Apr 1998 15:30:39 +0200, "thierry merlin" <t.merlin_at_citb.bull.net> wrote:
>Hi,
>I want to capture the status error of my procedure in a Shell script UNIX.
>I don't know how to put the status error in my procedure.
>Can somebody help me or send me any suggestion ?
>For example :
>
>my Shell script:
>
>sqlplus -s user/password << FIN
> execute proc_test;
>FIN
>
>=>proc_test must generate an error and I want to test this error ( if $error
>= ... then )
Hi Thierry,
there are two SQL*Plus commands that should do what your're looking
for. They are:
WHENEVER SQLERROR EXIT FAILURE
and
WHENEVER OSERROR EXIT FAILURE
They should have SQL*Plus exit with the appropriate os-specific
failure code when something goes wrong inside your script.
HTH
Peter
-- Peter Schneider peter.schneider_at_okay.netReceived on Wed Apr 01 1998 - 00:00:00 CST
![]() |
![]() |