Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> whenever sqlerror exit: exit code and rollback
Hi!
I have a SQL*Plus script that rolls back whenever an error occurs:
... whenever sqlerror exit SQL.SQLCODE ROLLBACK
Is there a way to get an exit code AND roll back when an error occurs?
I know that "... whenever sqlerror exit 99" exits with an error code but it does not roll back that transaction, i.e. if some insert statements were already sucessful then they are not rolled back.
Is there any way to exit with an error code and roll back the transaction?
This is 9.2 on HP-UX.
Thanks,
Helmut
![]() |
![]() |