作者:容易 2013-04-10 11:26:07
undo 表空间切换
1)创建 新的undo表空间
create undo tablespace UNDOTBS2 datafile '/u02/oradata/bi/undotbs_02_01.dbf' size 1024m
autoextend on next 256m maxsize 8g;
2)查看和修改当前undo表空间
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ -----------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
SQL> alter system set undo_tablespace='UNDOTBS2';
System altered.
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ -----------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS2
3)查看旧的undo数据文件是否被使用,如果被使用直接删除数据文件空间将不会被释放出来
lsof |grep 'undotbs_01.dbf'
4)当旧undo文件不在被使用的时候,将undo表空间离线,删除
alter tablespace UNDOTBS1 offline;
drop tablespace UNDOTBS1 including contents and datafiles ;
One Response