oracle - Rollback + Commit some changes -


i have case need rollback changes on database, also, want keep inserted logs.

illustration:

add processing log  insert data  insert data  insert data add processing log  checking...   checking failed   add processing log   rollback; 
  • log table on same database of other inserted data

is there way achieve ?

there is, expect centralized logging routine , in logging package, in function use write log, insert line after procedure header declaration

  pragma autonomous_transaction; 

that place log insertions on different transaction calling routine, allowing commit log regardless of happens in parent routine.

docs details : http://docs.oracle.com/cd/b28359_01/appdev.111/b28370/autotransaction_pragma.htm


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -