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

Home -> Community -> Usenet -> c.d.o.misc -> Re: exit status of sqlplus???

Re: exit status of sqlplus???

From: diversif <diversif_at_ix.netcom.com>
Date: 1997/02/19
Message-ID: <01bc1e93$32d6e060$437dd9ce@PHUBER>#1/1

You can put the following stmnt in the SQL script

    whenever sqlerror exit 5

The unix return code will be 5 if there was an error encountered in the script. The number can be between 1 and 255. You can also use: whenever sqlerror continue to void the exit on a stmnt that you will allow failure of. The 'whenever' is active until the next 'whenever' of the end of the session. Hope this helps.

Wang Chun <wangchun_at_iti.gov.sg> wrote in article <5ednnl$1bp_at_blackwidow.iti.gov.sg>...
> Hi,
>
> I tried to run a sql script using sqlplus, however, I could not figure
 out
> how to check the exit status at the unix shell level of a certain sql
 script
> to see whether the sql script is successful or failure.
>
> for example:
>
> shell>sqlplus @my_sql_script
>
> ...
>
> shell> (as when sqlplus exits, it always give me the exit code 0)
>
> Any suggestion?
>
> Thanks in advance!
>
Received on Wed Feb 19 1997 - 00:00:00 CST

Original text of this message

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