Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Status error in a Shell script UNIX

Re: Status error in a Shell script UNIX

From: Peter Schneider <peter.schneider_at_okay.net>
Date: 1998/04/01
Message-ID: <3522ce8f.4069154@news.ipf.net>#1/1

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.net
Received on Wed Apr 01 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US