Message-Id: <10529.109443@fatcity.com> From: Suzy Vordos Date: Thu, 15 Jun 2000 12:18:47 -0600 Subject: Re: How to check the status of a sql script Put this line as the first SQL statement: whenever sqlerror exit sql.sqlcode; The use $? in the shell to check for a non-zero return code. Suzy David Lee wrote: > > Hi all, > I am writing a shell script to do hot backups. I have a sql script embedded > in it saying ' alter tablespace ... begin backup' stuff. > Now I want to put something in my shell script so that if the sql script > fails, the hot backups are cancelled and tablespaces are taken out of > hot backup mode. But the thing is, How do I see the exit status of the sql > script? > > TIA > > David > ________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > -- > Author: David Lee > INET: dba_lee@hotmail.com > > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 > San Diego, California -- Public Internet access / Mailing Lists > -------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing).