今天因为调整了UNDO TABLESPACE的大小,是新增一个再删除老的。结果后来操作的时候,发生了如下错误:
SQL> drop tablespace UNDOTBS1 including contents cascade constraints;
drop tablespace UNDOTBS1 including contents cascade constraints
*
ERROR at line 1:
ORA-01548: active rollback segment '_SYSSMU6$' found, terminate dropping
tablespace
SQL>
再网上搜了一下,发现“http://www.oraforum.net/thread-1465-1-1.html”说的比较贴切。下面就是处理过程。
1. 找出具体的rollback segment,可能不止提示的那一个。
SQL> select segment_name from dba_rollback_segs where tablespace_name = 'UNDOTBS1';
SEGMENT_NAME
------------------------------
_SYSSMU6$
_SYSSMU7$
_SYSSMU8$
_SYSSMU9$
_SYSSMU10$
SQL>
2. 生成一个新的pfile.
SQL> create pfile='/tmp/aaa_tmp.ora' from spfile;
File created.
SQL>
3. 修改pfile,加上参数: _corrupted_rollback_segments
_corrupted_rollback_segments=(_SYSSMU6$,_SYSSMU7$,_SYSSMU8$,_SYSSMU9$,_SYSSMU10$)
4. 用新的pfile启动数据库。
SQL> shutdown immediate;
SQL> startup pfile='/tmp/aaa_tmp.ora'
SQL> drop tablespace UNDOTBS1 including contents and datafiles cascade constraints;
Tablespace dropped.
SQL>
5. 重新生成spfile。
SQL> create spfile from pfile='/tmp/aaa_tmp.ora';
SQL> shutdown immediate;
SQL> startup
OK!