Click here to Skip to main content
15,075,638 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
There are 16 Million of Records in oracle table 'TBLUSERACTIVITIES'. If I am running below query for 100 records, its updating record successfully. but if running for whole table getting the below error.

Query :
update EAITEMP.TBLUSERACTIVITIES b
set b.EventID1 = (select REGEXP_REPLACE(REGEXP_SUBSTR(a.ACTION, 'Event [0-9]+'),'Event ') as EventId1
from EAITEMP.TBLUSERACTIVITIES a where a.Key =b.Key) ,
b.EventID2 = (select REGEXP_REPLACE(REGEXP_SUBSTR(a.ACTION, 'Event [0-9]+',1,2,'i'),'Event ') as EventId2
from EAITEMP.TBLUSERACTIVITIES a where a.Key =b.Key)


Error report:
SQL Error: ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDO_DATA'
30036. 00000 - "unable to extend segment by %s in undo tablespace '%s'"
*Cause: the specified undo tablespace has no more space available.
*Action: Add more space to the undo tablespace before retrying
the operation. An alternative is to wait until active
transactions to commit.

Need urgent help
Thanks
Posted

1 solution

Yes, this is correct. Your query is causing the UNDO tablespace to drastically size-up.

If you REALLY have to do it in one query then you HAVE to allocate more space for this tablespace. This means spending money on infrastructure if you do not already have such kind of additional storage. I really doubt why you would need that though.

I suggest you break down into, say, batches of about 100000 updates and issue a commit after each such batch.

[Please vote-up the solution if it works for you and encourage participation.]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900