6. Working with Transactions and Handling Errors : Transactions : Abort Policy for Transactions and Statements : How to Direct the DBMS to Roll Back an Entire Transaction or Statement
 
Share this page                  
How to Direct the DBMS to Roll Back an Entire Transaction or Statement
To direct the DBMS to roll back an entire transaction (or a single statement), use the SET SESSION WITH ON ERROR = ROLLBACK STATEMENT | TRANSACTION statement.
Note:  The errors Deadlock, Transaction Log Full, and Lock Quota Exceeded always roll back the entire transaction regardless of the current ON_ERROR setting.