Re: Grrr! How do you make sqlplus exit on a syntax error!

From: Karsten Farell <kfarrell_at_medimpact.com>
Date: Tue, 08 Oct 2002 21:31:12 GMT
Message-ID: <08Io9.1632$pw7.197033192_at_newssvr13.news.prodigy.com>


Peter Lacey wrote:
> <rant>Who wrote this thing, anyway? Hasn't sqlplus been around for
> 100 years? Hasn't anyone ever needed to simply exit sqlplus when
> something -anything- goes wrong?</rant>

I'm not sure who wrote sqlplus, but your rant is shared by others. Jonathan Gennick, who wrote "Oracle SQL*Plus: The Definitive Guide" had this to say when talking about handling errors in scripts:

"SQL*Plus doesn't offer too much in the way of error handling. By default, SQL*Plus simply ignores errors and goes on to execute either the next command ... in the script you are running. ... Depending on what the script is doing, you may not want SQL*Plus to blindly proceed to the next command when an error occurs. ..."

He goes on to explain the two version of WHENEVER, lamenting that they are sorely inadequate. So you have company.

What I've done in perl scripts is to put the sqlplus output in a string which I can parse with regular expressions, looking for errors (after coding REs that bypass all the verbose stuff that sqlplus prints). I don't know if this is a viable option for you. Short of that, there isn't much hope. (You could write to Larry Ellison - :) - that will surely motivate him to change - yeah, right.) Received on Tue Oct 08 2002 - 23:31:12 CEST

Original text of this message