原因:
undo表空间已分配60G,还是报100%;虽然没影响,还是通过设置为自动扩展.
但是对于自动扩展的文件还有监控来判断是否还有可分配的空间。所以需要重建。
步骤:
1.创建默认表空间
create UNDO tablespace UNDOTBS3 DATAFILE ‘/u02/oradata/xxxx/undotbs03.dbf’ size 5G autoextend on maxsize 30G ;
2.切换默认表空间
ALTER SYSTEM SET UNDO_TABLESPACE = UNDOTBS3 scope=both;
手册特别提醒了,需要注意:
If the parameter value for UNDO TABLESPACE is set to ‘’ (two single quotes), then the current undo tablespace is switched out and the next available undo tablespace is switched in. Use this statement with care because there may be no undo tablespace available
3.确认所有的 seg都是offline
select status,count( * ) from dba_rollback_segs where tablespace_name=‘UNDOTBS1’
group by status;
需要确认所有事物已经提交,所有的都是 offline
An undo tablespace can exist in this PENDING OFFLINE mode, even after the switch operation completes successfully. A PENDING OFFLINE undo tablespace cannot be used by another instance, nor can it be dropped. Eventually, after all active transactions have committed, the undo tablespace automatically goes from the PENDING OFFLINE mode to the OFFLINE mode. From then on, the undo tablespace is available for other instances (in an Oracle Real Application Cluster environment)
4.删除表空间
drop tablespace UNDOTBS1 INCLUDING CONTENTS ;
5.删除操作系统原有文件
rm -f undotbs01.dbf
rm -f undotbs02.dbf
6 重复上面步骤切换成undotbs1
create UNDO tablespace UNDOTBS1 DATAFILE ‘/u02/oradata/xxxx/undotbs01.dbf’ size 5G autoextend on maxsize 30G ;
ALTER SYSTEM SET UNDO_TABLESPACE = UNDOTBS1 scope=both;
select status,count( * ) from dba_rollback_segs where tablespace_name=‘UNDOTBS3’
group by status;
drop tablespace UNDOTBS3 INCLUDING CONTENTS ;