在生产环境上,由于闪存盘的容量有限,现在需要将闪存盘里面的UNDO表空间,替换到非闪存的磁盘里面。
磁盘的使用情况如下:
表空间使用情况如下:
RAC两个节点占用将近167G的空间。
操作步骤如下:
在其他磁盘新建RAC两个节点的undo表空间,然后设置成默认的UNDO表空间,后面再新建名称一模一样的UNDO表空间,切换回来(之所以要切换回一样的UNDO表空间,是防止某些应用程序写死)。
操作如下,RAC两个节点:
一、新建UNDO表空间
节点1:
create undo tablespace undo11 datafile '+HDATADG' size 10g autoextend on next 2g;
alter system set undo_tablespace='UNDO11' SCOPE=BOTH;
节点2:
create undo tablespace undo22 datafile '+HDATADG' size 10g autoextend on next 2g;
alter system set undo_tablespace='UNDO22' scope=both;
二、删除原UNDO表空间
drop tablespace UNDOTBS1 including contents and datafiles;
drop tablespace UNDOTBS2 including contents and datafiles;
三、新建原UNDO表空间原名称的UNDO表空间,并切换,以及删除步骤二新建的UNDO表空间
create undo tablespace UNDOTBS1 datafile '+HDATADG' size 10g autoextend on next 2g;
alter tablespace UNDOTBS1 add datafile '+HDATADG' size 10g autoextend on next 2g;
create undo tablespace UNDOTBS2 datafile '+HDATADG' size 10g autoextend on next 2g;
alter tablespace UNDOTBS2 add datafile '+HDATADG' size 10g autoextend on next 2g;
切换回来UNDO表空间:
alter system set undo_tablespace='UNDOTBS1' SCOPE=BOTH;
alter system set undo_tablespace='UNDOTBS2' scope=both;
删除步骤二建的UNDO表空间:
drop tablespace UNDO11 including contents and datafiles;
drop tablespace UNDO22 including contents and datafiles;
查看磁盘空间:
立马闪存磁盘空间变多了。