• shutdown abort模式丢失redo,使用隐含參数启库


    shutdown abort模式
    丢失redo log
    无法open数据库
    通过告警报错ORA-00354: corrupt redo log block header 从该错误能够看出当前日志的redo block的header出现故障,导致oracle无法读取redo进行恢复。通过下面检查发现数据库文件头都一致。没有须要恢复的文件,可是因为数据库是非正常关闭。last_change scn没有被写入,数据库推断须要恢复。则读取对应的redo log group 3。可是此时该文件已经损坏。


    SYS@orcl11g>alter database open resetlogs;
    alter database open resetlogs
    *
    ERROR at line 1:
    ORA-01139: RESETLOGS option only valid after an incomplete database recovery
    
    
    SYS@orcl11g>recover database;
    ORA-00283: recovery session canceled due to errors
    ORA-00313: open failed for members of log group 3 of thread 1
    ORA-00312: online log 3 thread 1: '/opt/oracle/oradata/orcl11g/redo03.log'
    ORA-27046: file size is not a multiple of logical block size
    Additional information: 1
    
    
    SYS@orcl11g>recover database until cancel;
    ORA-00279: change 5168496 generated at 10/29/2014 23:48:23 needed for thread 1
    ORA-00289: suggestion : /opt/oracle/flash_recovery_area/ORCL11G/archivelog/2014_10_29/o1_mf_1_159_%u_.arc
    ORA-00280: change 5168496 for thread 1 is in sequence #159
    
    
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    
    ORA-00308: cannot open archived log '/opt/oracle/flash_recovery_area/ORCL11G/archivelog/2014_10_29/o1_mf_1_159_%u_.arc'
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    
    
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/opt/oracle/oradata/orcl11g/system01.dbf'
    



    增加下面隐含參数:
    SYS@orcl11g>show parameter _allow
    NAME                                 TYPE                   VALUE
    ------------------------------------ ---------------------- ------------------------------
    _allow_error_simulation              boolean                TRUE
    _allow_resetlogs_corruption          boolean                TRUE
    

    这时候发现数据库时能够打开的
    SYS@orcl11g>
    SYS@orcl11g>
    SYS@orcl11g>alter database open resetlogs;
    
    Database altered.
    
    SYS@orcl11g>
    
    
    
    
    发现日志文件已经被重建:
    SYS@orcl11g>select group#,status from v$log;
        GROUP# STATUS
    ---------- ------------------------------------------------------------
             1 CURRENT
             2 UNUSED
             3 UNUSED
    
    SYS@orcl11g>alter system switch logfile;
    
    System altered.
    
    SYS@orcl11g>/
    
    System altered.
    
    SYS@orcl11g>/
    
    System altered.
    
    
    SYS@orcl11g>select group#,status from v$log;
        GROUP# STATUS
    ---------- ------------------------------------------------------------
             1 CURRENT
             2 INACTIVE
             3 ACTIVE
    



  • 相关阅读:
    16条很有用的Chrome浏览器命令
    通用测试用例
    Vue中@click、@click.stop和@click.prevet用法
    Vue事件的函数传参
    Vue事件的基本用法
    vue中v-on和v-bind的区别
    Vue中数据的双向绑定方法
    v-once用法
    v-clock、v-text、v-html和v-pre详解
    IDEA给已有项目添加maven依赖
  • 原文地址:https://www.cnblogs.com/claireyuancy/p/6823809.html
Copyright © 2020-2023  润新知