Re: PASS ERROR RETURN CODES?

From: Balakrishna Avula <100610.52_at_compuserve.com>
Date: 1996/01/25
Message-ID: <4e7o70$3l9_at_relay2.uk.mdis.com>#1/1


tjwood_at_umich.edu (Thomas Wood) wrote:

>--
>
>Is there away to pass return codes and/or variables from Oracle to Unix
>shell script? I have a batch job that will use SQL, export, and sqlloader.
>Each piece is dependent on the success of each other. (If my export fails,
>for what ever reason, I don't want SQL or PLSQL to run and so on). Is
>DBPERL/ORAPERL the only answer?
>
> ....................................
> : Thomas Wood :
> : email: tjwood_at_umich.edu :
> : DBA Analyst - KELLY Services INC :
> : (810)244-4033 :
> :..................................:
 

> Opinions expressed are my own and
> not necessarily those of my employer

You could return error code from SQLPLUS using EXIT SQLCODE|FAILURE|SUCCESS. I think exp does return error to unix. Try $?(or similar to find last command success/failure) with an if to do conditional execution based on last command success/failure

Hope this helps you. Received on Thu Jan 25 1996 - 00:00:00 CET

Original text of this message