Saturday 26 May 2012

How can a transaction be retried after an exception? | PL SQL

The following method can be used to retry a transaction after an exception is raised:
?    The transaction should be written within a sub-block
?    The sub-block can be placed inside a loop that repeats the transaction  Mark a save point before starting the transaction. If the transaction succeeds, then commit and exit from the loop. If the transaction fails, the control is transferred to the exception handler where the transaction is rolled back to the save point to undo the changes, and then try to fix the problem.