Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Rollback segments
On Fri, 18 Sep 1998 13:43:21 -0400, Kevin Kirkpatrick <kjk_at_hrb.com> wrote:
>I am trying to do an UPDATE on half a million rows of data. I keep
>getting the following error:
>
>ORA-01562: failed to extend rollback segment number 2
>ORA-01650: unable to extend rollback segment R01 by 5000 in tablespace
>RBS
>
>Is there some way that I can modify the segments (there are 4 besides
>SYSTEM) so that I can execute this command fully? I don't care if I
>don't have the option to rollback or not.
You can create larger rollback segments but maybe it's easier to perform your update in smaller parts. Suppose you want to update a NULL valued field. You can then easily say:
UPDATE YOURTABLE
SET FIELD = 'XXX'
WHERE FIELD IS NULL
AND ROWNUM < 100001;
The first 100000 rows will be processed. You can then commit and continue to do the rest in the same way. You can also do it with PL/SQL and cursors.