Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Unable to extend rollback segment problem
I am having problems running this SQL script. The script basically
opens 3 cursors, updating the first table's percent column by calculating
the percent based on quotient of table 2's amount divided by table 3's
amount
where the rows join.
I've run this SQL with no users on the system.
The error I get is
"ORA-01562 Failed to extend rollback segment (id = 1)"
"ORA-01650 Unable to extend rollback segment R01 by 1280 in tablespace RBS"
set transaction use rollback segment R01
curser cur1 is
select table1_key
fk percent
curser cur2 is
select fk_table1_key
fk sum (amount)
fk
cur2_row cur2row%rowtype
curser cur3 is
select fk_table1_key
fk sum (amount)
fk
cur3_row cur3row%rowtype
begin
open cur1
loop
fetch cur1 into cur1_row
exit when cur1%not_found
open cur2
fetch cur2 into cur2_row
open cur3
fetch cur3 into cur3_row
if cur2%found
and cur3%found then
if table2.amount = 0 then
update table1
set percent = 0;
elsif table2.amount <> 0 then
update table1
set percent = (table3.amount / table2.amount)
where table1_key = cur1_row.table1_key
and fk = cur1_row.fk;
endif;
endif;
close cur2; close cur3;
![]() |
![]() |