Friday, November 19, 2010

ORA-01548 active rollback segment , Unable drop undo tablespace

When undo get a huge rollback segment it may causing a lot trouble to shutdown and start. Oracle seems to check all active undo and do recovery. But sometime the rollback segment was bad.

To clean this up

  1. find out active rollback segment. Either by SQL or try to drop undo tablespace.
    select segment_name, status from dba_rollback_segs where tablespace_name='undotbs_corrupt' and status = ‘NEEDS RECOVERY’;
  2. shutdown database. It may take pretty long time to shutdown.
  3. change parameter
    *.undo_management='MANUAL'
    *._offline_rollback_segments=_SYSSMU10$,_SYSSMU11$,_SYSSMU12$,_SYSSMU13$,_SYSSMU14$,_SYSSMU15$,_SYSSMU16$)
  4. bring up database
  5. Drop the UNDO tablespace.
  6. Recreate UNDO tablespace.
  7. shutdown database
  8. change parameter back to original
  9. bring up database
The key part is change undocumented parameter _offline_rollback_segments, this way it will allow you to drop active rollback segment.