Support Singapore

Support Singapore YOG 2010

Thursday, August 28, 2008

Recovery from corrupted rollback segments

I had a hard day from yesterday as we had a hardisk crash in one of our servers.It was in a QA environment so the impact was not great.

No Backups for QA except weekly Export backup but it failed for last two weeks,so realistically no backup availble.Instance terminated leaving a message in alert.log saying that UNDO tablespace segments got corrupted.

Oracle 9i and 10g on a windows 2003 server.

The behaviour was different between 9i and 10g

First 9i

The lost hard disk had 9i and 10g on it.

I tried to start the DB but after mounting the undo datafile didnt come up with a messgae Corrupted block

I tried to offline drop and it worked and then i tried to drop the UNDO tablespace it didnt allow with Recurvis sql, and ora 600 error.

I managed to find out the rollback segments which needed recovery ,SMON was throwng errors in the Alert log saying the Rollback segament corrupted

Then i decided to go for UNSUPPORTED parameter in the INIT.ora

shutdown the database
edit the init and added the following
_OFFLINE_ROLLBACK_SEGEMNTS=(...)
UNDO_management=MANUAL
commented the UNDO_TABLESPACE in the init.ora

Started the database and opened it

now it tried to drop the UNDO tablespace and it worked
Created a new undo tablespace
Shutdwon the DB
Edit the init.ora again to comment the _OFFLINE_ROLLBACK_SEGEMNTS and set the UNDO_TABLESPACE value

Database opened and no more errors and did a full backup of the DB with Export.

The scenario was slightly is different in 10g
once i offline drop the undo tablespace datafile i opened the database and created and new undoablespace--This i couldnt so it in 9i
Now found the ROLLABCKSEGEMNT and edited the init.ora _OFFLINE_ROLLBACK_SEGEMENTS and changed the UNDO_TABLESPACE to the new UNDO

Opened the DB dropped the OLD UNDO

Database was UP

Export full backups
:)
Hard day.