re: set based transaction management; SAVEPOINTS

  • From: Cosmin Ioan <cosmini@xxxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 12 Jul 2007 08:38:00 -0700 (PDT)

hello all,
one more quandary and I'll try to illustrate it by a small example:
A big procedure (in a package), PROC_A is executed from Java.  I want (at the)  
Java (level) to  determine the  COMMIT/ROLLBACK (at the very end) or commit 
every X records.

PROC_A  contains a LOOP on possibly hundreds or thousands of iterations.
Each iteration can contain multiple DML operation, and each of these DML 
operation can fail (select not found, record not updated, insert key violation, 

How can I code this transaction management -- through (dynamic SAVEPOINTS? -- 
is there such a thing?)  so that when (and if transaction management, the 
commit is done only at the very end of PROC_A) any one of these DML's fail, 
then I roll back **all of the operations within that specific iteration only** 
(but previous or subsequent successful iterations get committed).

any thoughts?
thx a bunch,

Other related posts: