1、检查原来undo表空间情况:
select file_name,bytes/1024/1024 as MB from dba_data_files where tablespace_name like 'UNDO%';
2、创建新的undo表空间:
create undo tablespace undotbs2 datafile '/u01/app/oracle/oradata/orcl/undotbs02.dbf' size 2g autoextend on next 10m maxsize 10g;
3、切换到新的undo表空间:
alter system set undo_tablespace=undotbs2 scope=both;
4、检查原来undo表空间是否还在使用:
select usn,xacts,rssize/1024/1024/1024,hwmsize/1024/1024/1024,shrinks from v$rollstat order by rssize;
如果没有PENDING OFFLINE字样表示已经不再使用。
5、删除原来undo表空间:
drop tablespace undotbs1 including contents and datafiles;
--转自