Snowfun

导航

 

删除表空间报错误,drop tablespace 表空间名

出错现象:ORA-01548: active rollback segment '_SYSSMU124_3867542486$' found, terminate dropping tablespace
错误原因:删除undo表空间中的segment需要回复
解决方法:删除回滚段信息
 select tablespace_name from dba_tablespaces;
空闲表空间大小:select tablespace_name, sum(bytes)/1024/1024 from dba_free_space group by tablespace_name;
 
查看当前表空间,显示为UNDOTBS2    :Show parameter undo_tablespace。

创建新的UNDO表空间,并将默认表空间设置为新的表空间UNDOTBS10

create undo tablespace undotbs10 datafile '/u01/app/oracle/oradata/undotbs329.daf'size 1g autoextend on next 100m maxsize unlimited;

处理方法如下:

1、找出具体的rollback segment回滚段,可能不止提示的那一个。

select segment_name from dba_rollback_segs where tablespace_name = 'UNDOTBS2';

2、生成一个新的pfile,

create pfile='/tmp/aaa_tmp.ora' from spfile;

3、再修改pfile,加上参数: _corrupted_rollback_segments

*。_corrupted_rollback_segments=(
_SYSSMU137_3713081172$,
_SYSSMU136_2346322639$,
_SYSSMU135_208365995$,
_SYSSMU134_731245831$,
_SYSSMU133_1497841020$,
_SYSSMU132_3151843953$,
_SYSSMU131_392048669$,
_SYSSMU130_1318462179$,
_SYSSMU129_3852103059$,
_SYSSMU128_2642833577$,
_SYSSMU127_4253348633$,
_SYSSMU126_4210770887$,
_SYSSMU125_2903145910$,
_SYSSMU124_3867542486$)

 

 

4、关闭数据库后,用新的pfile启动数据库。

shutdown immediate;
startup pfile='/tmp/aaa_tmp.ora'

drop tablespace undotbs2 including contents and datafiles;

5、重新生成spfile。

 

 

 PS:

1、查看默认UNDO表空间:Show parameter undo_tablespace。

2、查看所有表空间:SELECT * FROM v$tablespace;

 

 

 

 
posted on 2018-03-29 11:34  Snowfun  阅读(695)  评论(0编辑  收藏  举报