• 日志格式化


    oracle数据库安装,一般需要对日志文件进行日志格式化。

    
    
    SQL> select group#,status,member from v$Logfile;
    +DATA/ORCL/ONLINELOG/group_3.284.979319979
    
    #
    alter database add logfile thread 1 group 21('+DATA','+DATA') size 512m;
    alter database add logfile thread 1 group 22('+DATA','+DATA') size 512m;
    alter database add logfile thread 1 group 23('+DATA','+DATA') size 512m;
    alter database add logfile thread 1 group 24('+DATA','+DATA') size 512m;
    alter database add logfile thread 1 group 25('+DATA','+DATA') size 512m;
    
    
    alter database add logfile thread 2 group 31('+DATA','+DATA') size 512m;
    alter database add logfile thread 2 group 32('+DATA','+DATA') size 512m;
    alter database add logfile thread 2 group 33('+DATA','+DATA') size 512m;
    alter database add logfile thread 2 group 34('+DATA','+DATA') size 512m;
    alter database add logfile thread 2 group 35('+DATA','+DATA') size 512m;
    
    #
    
    
    alter database drop logfile group 3;
    alter database drop logfile group 4;
    alter database drop logfile group 5;
    alter database drop logfile group 6;
    alter database drop logfile group 7;
    
    
    alter database drop logfile member '/picclife/app/oracle/oradata/cdbdev/redo03.log';
    
    #
     alter system archive log current;
    alter system checkpoint;
    #RAC
    alter system checkpoint global;
    /opt/oracle/oradata/filenet/redo03.log alter database add logfile thread 1 group 21('/picclife/app/oracle/oradata/cdbdev/redo21.log') size 512m; alter database add logfile thread 1 group 22('/picclife/app/oracle/oradata/cdbdev/redo22.log') size 512m; alter database add logfile thread 1 group 23('/picclife/app/oracle/oradata/cdbdev/redo23.log') size 512m; alter database add logfile thread 1 group 24('/picclife/app/oracle/oradata/cdbdev/redo24.log') size 512m; alter database add logfile thread 1 group 25('/picclife/app/oracle/oradata/cdbdev/redo25.log') size 512m; alter database add logfile thread 1 group 26('/picclife/app/oracle/oradata/cdbdev/redo26.log') size 512m; -- alter database drop logfile group 4; alter database drop logfile group 5; alter database drop logfile group 6; alter database drop logfile group 7;
    查询当前环境日志组状态
    select group#,THREAD#,sequence#,bytes/1024/1024,status from v$log;
    
        GROUP#    THREAD#  SEQUENCE# BYTES/1024/1024 STATUS
    ---------- ---------- ---------- --------------- --------------------
            71          1     247102            1024 INACTIVE
            72          1     247103            1024 INACTIVE
            73          1     247104            1024 INACTIVE
            74          1     247105            1024 CURRENT
            75          1     247101            1024 INACTIVE
            81          2     257860            1024 CURRENT
            82          2     257856            1024 INACTIVE
            83          2     257857            1024 INACTIVE
            84          2     257858            1024 INACTIVE
            85          2     257859            1024 INACTIVE
    
    10 rows selected.
  • 相关阅读:
    每天一个linux命令(5):rm 命令
    每天一个linux命令(3):pwd命令
    c++11之lambda表达式
    C++11之std::future和std::promise和std::std::packaged_task
    金三银四,为什么面试你总拿不到高薪?
    高并发神器 Nginx,到底该怎么学?
    好文 | MySQL 索引B+树原理,以及建索引的几大原则
    为什么 TCP 建立连接是三次握手,关闭连接确是四次挥手呢?
    Java & 架构硬核福利,速度上车!
    Intellij IDEA 阅读源码的 4 个绝技,我必须分享给你!
  • 原文地址:https://www.cnblogs.com/lvcha001/p/10312695.html
Copyright © 2020-2023  润新知