benjamenus
Programmer
My database uses several rollback segments, this is their normal state:
RB1 - Online - Small in size
RB2 - Online - Small
RB3 - Offline - Large
I have a large update to perform at night. I schedule a batch file which opens SQLPlus and logs in to the database. It then runs an SQL script which begins like this:
spool C:\test.log
connect x/y@z
update sys.undo$
set sys.undo$.status$=2
where sys.undo$.name='RB1';
update sys.undo$
set sys.undo$.status$=2
where sys.undo$.name='RB2';
update sys.undo$
set sys.undo$.status$=3
where sys.undo$.name='RB3';
It then follows with the update SQL.
The idea is that RB1 and RB2 are taken offline and RB3 is put online. However, when I checked the log this morning I had the following error:
update TABLE
*
ERROR at line 1:
ORA-01562: failed to extend rollback segment number 1
ORA-01628: max # extents (505) reached for rollback segment RB1
I was a little surprised as I though RB1 should've been offline. Does anyone know why this happened and how to avoid it? Would using a separate script to change the status of rollback segments prior to running the update work?
Cheers
RB1 - Online - Small in size
RB2 - Online - Small
RB3 - Offline - Large
I have a large update to perform at night. I schedule a batch file which opens SQLPlus and logs in to the database. It then runs an SQL script which begins like this:
spool C:\test.log
connect x/y@z
update sys.undo$
set sys.undo$.status$=2
where sys.undo$.name='RB1';
update sys.undo$
set sys.undo$.status$=2
where sys.undo$.name='RB2';
update sys.undo$
set sys.undo$.status$=3
where sys.undo$.name='RB3';
It then follows with the update SQL.
The idea is that RB1 and RB2 are taken offline and RB3 is put online. However, when I checked the log this morning I had the following error:
update TABLE
*
ERROR at line 1:
ORA-01562: failed to extend rollback segment number 1
ORA-01628: max # extents (505) reached for rollback segment RB1
I was a little surprised as I though RB1 should've been offline. Does anyone know why this happened and how to avoid it? Would using a separate script to change the status of rollback segments prior to running the update work?
Cheers