加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ORACLE RAC 11G 添加以及删除UNDO表空间

发布时间:2020-12-12 13:41:38 所属栏目:百科 来源:网络整理
导读:在生产环境上,由于闪存盘的容量有限,现在需要将闪存盘里面的UNDO表空间,替换到非闪存的磁盘里面。 磁盘的使用情况如下: 表空间使用情况如下: RAC两个节点占用将近167G的空间。 操作步骤如下: 在其他磁盘新建RAC两个节点的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;

?

查看磁盘空间:

立马闪存磁盘空间变多了。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读