Home » SQL & PL/SQL » SQL & PL/SQL » doubt using whenever sqlerror exit
doubt using whenever sqlerror exit [message #221507] Tue, 27 February 2007 04:19 Go to next message
rolex.mp
Messages: 161
Registered: February 2007
Senior Member
I want to quit from the plsql script file when sqlerror is encountered and I want to pass the error message to shell script , can "whenever sqlerror exit" be used to pass the error messages to shell script?

How can this be done?
Re: doubt using whenever sqlerror exit [message #221627 is a reply to message #221507] Tue, 27 February 2007 16:49 Go to previous message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
You can return and test for the errorlevel. For example

WHENEVER SQLERROR EXIT 2 ROLLBACK


Would error when a sql error happened and set the errorlevel to 2.
Previous Topic: 8i Organization external error when creating table from unix script
Next Topic: Dynamic Procedure call
Goto Forum:
  


Current Time: Sat Dec 07 05:24:03 CST 2024