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 -> SQL*PLUS and shell scripts

SQL*PLUS and shell scripts

From: Prashant Gaba <pgaba_at_usccmail.bms.com>
Date: 1997/03/13
Message-ID: <332893E2.5A32@usccmail.bms.com>#1/1

Hi All,

I am trying to productionise some of the queries that we run. My question is:

        How can I return the sql error code to a Unix shell script? I tried putting "WHENEVER SQLERROR EXIT SQLCODE" and although sqlplus exits with an error it does not return the correct code to the shell script which always displays 1.

I also tried hardcoding 942 in place of sqlcode and when i displayed the error code in the shell script it displays 174. I know this is possible as I have done this DCL on VMS but I am missing something here.
Can some one help????

Thanks

--
Prashant Gaba
Consultant
e-mail: pgaba_at_usccmail.bms.com
Received on Thu Mar 13 1997 - 00:00:00 CST

Original text of this message

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