Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Rollback Segment Too Old & Cursors Question
Hi,
This question was asked before but this is a continuation of that age
old problem. I have a large table and I have a PL/SQL that fetchs over
this table. After I am done with each row, I used to commit by changes
and go on fetching another row from the same table. The table I fetch
and update is the same table. I run into rollback segment too old
problem since the fetch didnot like me committing. Upon advice I have
written a small exception to close and open the cursor when rollback
segment too old error happens. Everything worked fine and it finished
till the end. Then when I did a search whether any row out there is not
updated. I found one row. I believe this row is the row that rollback
segment error happened and I closed opened the cursor. My question is
during the next open, why is this row not included in the row set ?
Should I do a rollback before closing and opening cursor ? If so why,
I havenot at the time committed anything therefore I should have found
out the row that the error happened. Program logic
loop
begin
fetch cursor
......
commit
exception
when rollback_segment_too_old then
close cursor open cursor