Q
Manage Learn to apply best practices and optimize your operations.

How to stop scripts when error condition occurs

There is probably a simple answer to this, but I have not been able to find it. We have several SQL scripts that are called from Unix and run under SQL*Plus. We would like some of these scripts to stop execution when an error condition occurs. I have not been able to find the setting that will exit SQL*Plus on an error. Is there a setting, or do we just have to do a bunch of manual error handling?

Please have the following statement in your SQL script:

WHENEVER SQLERROR EXIT
 

Dig Deeper on Using Oracle PL-SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close