zoukankan      html  css  js  c++  java
  • 修改Oracle归档日志方法

    修改Oracle归档日志的方法

    Oracle默认安装的归档日志只有50M,在做大量操作的时候会经常切换日志文件,造成性能问题,下面是具体操作方法

    1、 下面是查看现有归档日志大小:

     

     SQL> select group#, bytes, status from v$log;

       

    2、  下面是查看归档日志组和路径信息:

    SQL> select group#, member from v$logfile;

        

    3、 添加新的归档日志组,本例为添加4、5、6三个组:

    SQL> alter database add logfile group 4 '/uc/app/oradata/UCDATA/redo04a.log' size 500M;

    SQL> alter database add logfile group 5 '/uc/app/oradata/UCDATA/redo05a.log' size 500M;

    SQL> alter database add logfile group 6 '/uc/app/oradata/UCDATA/redo06a.log' size 500M;

     

    4、 再为4、5、6三个组中分别添加1个组员:

     SQL> alter database add logfile member '/uc/app/oradata/UCDATA/redo04b.log' to group 4;

     SQL> alter database add logfile member '/uc/app/oradata/UCDATA/redo05b.log' to group 5;

     SQL> alter database add logfile member '/uc/app/oradata/UCDATA/redo06b.log' to group 6;

     SQL>

    5、 查看添加后的组状态:

      SQL> select group#, bytes, status from v$log;

       

     SQL> select group#, member from v$logfile;

        

    6、 切换归档日志活动组:

    SQL> alter system switch logfile;

     System altered.

     SQL>  select group#, status from v$log;

        

    SQL>  alter system switch logfile;

     SQL>  select group#, status from v$log;

       .

     SQL>

    7、 待上面三个组都变为 INACTIVE时,即可删除前面3个归档日志组,那3个组为50M,过小:

     SQL> alter database drop logfile group 1;

     SQL> alter database drop logfile group 2;

     SQL> alter database drop logfile group 3;

     SQL> select group#, bytes, status from v$log;

        

    8、 最后删除日志文件

     

     

  • 相关阅读:
    2017"百度之星"程序设计大赛
    2018省赛赛第一次训练题解和ac代码
    2018天梯赛第一次训练题解和ac代码
    rsa Round #71 (Div. 2 only)
    AtCoder Grand Contest 021
    Hello 2018
    Educational Codeforces Round 36 (Rated for Div. 2)
    Codeforces Round #462 (Div. 2)
    Codeforces Round #467 (Div. 2)
    [Offer收割]编程练习赛48
  • 原文地址:https://www.cnblogs.com/freeton/p/3471498.html
Copyright © 2011-2022 走看看