We have a script that deploys code to our database as part of our application deployments. Currently, if a view or package errors, it ignores that error and moves on. We want it to fail at that point and exit sqlplus. I found the WHENEVER SQLERROR
statement, but found that it treats warnings as errors. We need it to continue on a warning but fail on an error. Is this possible?
What oracle version? And can you give more detail of the circumstance? Oracle has methods of trapping errors within a block using the 'exception' statement, which allows you to capture the exact error number and choose an action. If you are deploying code, it would probably be possible to call your compilation task from within an execution block (alter ... compile), and trap any errors and warnings. Sorry about the duplicate, I tried to delete the original and didnt realize someone had at looked at it that quickly.