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 -> Capturing errors from SQL scripts

Capturing errors from SQL scripts

From: <ekological_at_my-deja.com>
Date: 2000/07/26
Message-ID: <8lnq8b$c1r$1@nnrp1.deja.com>#1/1

Hi. I am developing in an environment that uses a scheduler to automate most processes. A few of my processes require me to use simple SQL statements that insert a large result from a multi-table join to a target table. The problem I'm encountering is that we are doing something like:

echo $PSWD | sqlplus ${UID}@${SID} @${SQL_SCRIPT} > ${LOGFILE};

to run the SQL scripts. Using this method, sqlplus always returns 0. So if one of my queries runs out of TEMP space, Rollback space, or encounters some other error, the return of the above command always indicates success.

My question is if there is a way of capturing these errors and processing conditionally based on the results of the previous sql statement. PL/SQL, OCI, Perl??? Any ideas? I would rather not have to reinvent the wheel.

Can you please CC (chester_p_wong_at_yahoo.nospam.com) ..remove the nospam..since I find navigating Deja.com fairly confusing.

TIA,
Chester

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Jul 26 2000 - 00:00:00 CDT

Original text of this message

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