Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> PLSQL procedure gets hung..
Another intriguing problem for you, Oracle Experts:
I have been given a PLSQL procedure to be debugged that gets hung when
executed. It basically implements a Cascade Update by inserting a new
record with a new ID, then updating all the child records with the new
ID, and finally deletes the record with the old ID from the parent
table. Interesting thing is that when I execute all the sql statements
within this procedure one by one, everything works fine. The only
diffence that I can see is that in the procedure commits are done by
calling 'STANDARD.commit'. I don't really know why 'STANDARD.commit'
would be used rather than just 'commit'. But this leads me to think that
something is wrong with this.
Does anybody have any ideas if this could be the reason or what else
could be the cause of this problem? The procedure is basically as
follows:
insert into parent
select newId, ..., .... from parent where doc_id = OldId.
commit;
update chiltable1 set doc_id = NewId where doc_id= OldId;
commit;
update childtable2 set doc_id = NewId where doc_id= Oldid;
commit
....
update childtable3 ...
..
commit;
delete from parent where doc_id = OldId;
Thanks..
Have a bug-free day..
Tansel Received on Fri Apr 03 1998 - 00:00:00 CST
![]() |
![]() |