zoukankan      html  css  js  c++  java
  • 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;

    查看磁盘空间:

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

  • 相关阅读:
    【长安十二时辰】 刺客信条风格剪辑
    【Oracle 触发器】(6)触发器应用场景--数据的备份和同步
    【Oracle 触发器】(5)触发器应用场景--数据库的审计
    银行窗口取号系统,共享数据的线程安全性
    模板方法
    创建线程时如果既传入了runnable对象,又继承thread重写了run方法,会执行哪里的代码
    启动线程用start方法而不是run方法
    java的回调
    java中的闭包
    静态内部类
  • 原文地址:https://www.cnblogs.com/hmwh/p/9926399.html
Copyright © 2011-2022 走看看