• 【练习---日志恢复】正常关库删除一组当前日志组


    1.查询当前日志组及状态:

    10:45:14 SYS@ORA11GR2>select group#,member from v$logfile;
    
        GROUP# MEMBER
    ---------- --------------------------------------------------
             3 /u01/app/oracle/oradata/ORA11GR2/redo03.log
             2 /u01/app/oracle/oradata/ORA11GR2/redo02.log
             1 /u01/app/oracle/oradata/ORA11GR2/redo01.log
             3 /u01/app/oracle/disk/redo03b.log
             2 /u01/app/oracle/disk/redo02b.log
             1 /u01/app/oracle/disk/redo01b.log
    
    6 rows selected.
    
    10:45:26 SYS@ORA11GR2>select group#,members,bytes/1024/1024 M,status from v$log;
    
        GROUP#    MEMBERS          M STATUS
    ---------- ---------- ---------- ----------------
             1          2         50 CURRENT
             2          2         50 INACTIVE
             3          2         50 ACTIVE

    2.模拟故障(正常关库删除一组当前日志组):

    10:45:53 SYS@ORA11GR2>shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    
    [oracle@host03 ~]$ rm /u01/app/oracle/oradata/ORA11GR2/redo01.log
    [oracle@host03 ~]$ rm /u01/app/oracle/disk/redo01b.log

    3.起库报错,查看alert日志:

    ORA-00313: open failed for members of log group 1 of thread 1
    ORA-00312: online log 1 thread 1: '/u01/app/oracle/disk/redo01b.log'
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/ORA11GR2/redo01.log'
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3

    4.解决:将数据库起到mount

    10:50:09 SYS@ORA11GR2>alter database clear logfile group 1;
    
    Database altered.
    
     
    10:51:35 SYS@ORA11GR2>select group#,members,bytes/1024/1024 M,status from v$log;
    
        GROUP#    MEMBERS          M STATUS
    ---------- ---------- ---------- ----------------
             1          2         50 UNUSED
             3          2         50 INACTIVE
             2          2         50 CURRENT
    
    10:51:41 SYS@ORA11GR2>alter database open;
    
    Database altered.

     

  • 相关阅读:
    【转】性能测试分享---java vuser协议(2)---LoadRunner篇
    【转】性能测试分享---java协议(1)------jemter篇
    windows下怎么修改mysql密码
    linux下怎么修改mysql的字符集编码默认分类
    java使用Redis2--保存对象
    java使用Redis1--安装与简单使用
    java实现hash一致性算法
    Redis Sentinel初体验
    Redis持久化实践及灾难恢复模拟
    Redis学习笔记
  • 原文地址:https://www.cnblogs.com/tomatoes-/p/6159420.html
Copyright © 2020-2023  润新知