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: sqlplus return codes on unix

Re: sqlplus return codes on unix

From: David Scott <dlscott_at_mindspring.com>
Date: 1997/01/04
Message-ID: <dlscott-0401971202410001@user-37kb6qc.dialup.mindspring.com>#1/1

In article <32cbc5ed.3223877_at_n5.gbso.net>, chuckh_at_dvol.com (Chuck Hamilton) wrote:

> Is there a way to get the full return code from SQLPLUS back to a unix
> shell script? Unix only looks at the low-order byte. Is there perhaps
> a specific shell that'll get a two byte return code?

Instead of worrying about the return code, I've created a wrapper for SQL*Plus in our unix environment. The wrapper script causes a log file to be written, then greps (we use egrep) out "ORA-" and "error", and then sets its own error code appropriately.

We use this approach with both sqlplus and sqlldr. In addition, we place comments in our script of the form "--IGNORE ORA-xxxxx", which allows egrep to ignore non-critical errors (index exists, etc.).

Let me know via email if you'd like to see the script. I hope to put it up on the Web in the not-too-distant future.


David Scott                        ...how can I keep from singing?
                bumper snicker: My other guitar is a Martin (D16H)
email: dlscott_at_mindspring.com
Received on Sat Jan 04 1997 - 00:00:00 CST

Original text of this message

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