Re: How to know if a sqldba command failed ?

From: Louis Feges <lfeges_at_hookup.net>
Date: 1995/07/07
Message-ID: <lfeges.31.2FFD8005_at_hookup.net>#1/1


In article <3tbvp4$ek8_at_ccpnws.in2p3.fr> chaleat_at_cc.in2p3.fr (Philippe Chaleat) writes:
>From: chaleat_at_cc.in2p3.fr (Philippe Chaleat)
>Subject: How to know if a sqldba command failed ?
>Date: 4 Jul 1995 18:03:16 GMT
 

>Hello,

>How could now if a sqldba command failed. For instance, in csh:
 

> sqldba lmode=y << EOF
> connect toto/toto
> EOF
> SQL*DBA: Release 7.1.4.1.0 - Production on Tue Jul 4 19:58:53 1995
 

> Copyright (c) Oracle Corporation 1979, 1994. All rights reserved.
 

> Oracle7 Server Release 7.1.4.1.0 - Production Release
> PL/SQL Release 2.1.4.0.0 - Production
 

> SQLDBA> ORA-01034: ORACLE not available
> ORA-07429: smsgsg: shmget() failed to get segment.
> IBM AIX RISC System/6000 Error: 2: No such file or directory
> SQLDBA>
> SQL*DBA complete.
 

> echo $status
> 0
 

>I was expected something different (1 for example...)

> Thanks for any advice...

Only way that i know is to grep the output file for 'ORA-' and assume the worst if found. None of the Oracle execs, SQLPLUS/SQLLOAD/..etc. can be relied upon to return a non-zero return-code when failing.

\louis Received on Fri Jul 07 1995 - 00:00:00 CEST

Original text of this message