ORACLE RAC 11G 添加以及刪除UNDO表空間


在生產環境上,由於閃存盤的容量有限,現在需要將閃存盤里面的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;

 

查看磁盤空間:

立馬閃存磁盤空間變多了。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM