Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to delete without touching the rollback segment error

490614Mar 25 2007 — edited Mar 26 2007
I have been recently getting 'SEGMENT' error as shown below

ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01562: failed to extend rollback segment number 2
ORA-01650: unable to extend rollback segment R01 by 64 in tablespace RBS
ORA-01562: failed to extend rollback segment number 2
ORA-01650: unable to extend rollback segment R01 by 64 in tablespace RBS

I contacted the DB and he refuses to increase any segment changes. I have been asked to change 'commit after every few records' to avoid this. This would mean considerable amount of code change in Java factories (in all delete methods).

How do i go about it? I have been thinking of a procedure which when passed the delete logic and the target table will delete using commit after every x records.

something like this

procedure (IN delete_id number, IN varchar2 tableName, OUT deleteCount number){
- get the rowids to delete
- for each x rowids
delete
commit;
- return count of all succcessful deletion
}


Please help

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2007
Added on Mar 25 2007
5 comments
1,075 views