zoukankan      html  css  js  c++  java
  • _allow_resetlogs_corruption打开数据库

    我在模拟归档日志丢失,不完全恢复的时候,无法打开数据,最后采用_allow_resetlogs_corruption进行打开

    SQL> alter database open resetlogs;
    alter database open resetlogs
    *
    ERROR at line 1:
    ORA-01152: file 9 was not restored from a sufficiently old backup
    ORA-01110: data file 9:
    '/u01/app/oracle/oradata/ora12c/ora12cpdb1/system01.dbf'


    SQL>

    SQL> startup force;
    ORACLE instance started.

    Total System Global Area  771751936 bytes
    Fixed Size                  8797536 bytes
    Variable Size             566231712 bytes
    Database Buffers          192937984 bytes
    Redo Buffers                3784704 bytes
    Database mounted.
    ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

    备份spfile
    SQL> create pfile='/home/oracle/pfile.txt' from spfile;

    File created.

    开启_allow_resetlogs_corruption
    SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile;

    尝试恢复
    SQL> recover database using backup controlfile until cancel;
    ORA-00279: change 2184138 generated at 12/11/2019 01:29:23 needed for thread 1
    ORA-00289: suggestion : /u01/app/oracle/archive_log/1_41_1026270447.dbf
    ORA-00280: change 2184138 for thread 1 is in sequence #41


    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    auto
    ORA-00308: cannot open archived log
    '/u01/app/oracle/archive_log/1_41_1026270447.dbf'
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 7


    ORA-00308: cannot open archived log
    '/u01/app/oracle/archive_log/1_41_1026270447.dbf'
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 7


    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01152: file 9 was not restored from a sufficiently old backup
    ORA-01110: data file 9:
    '/u01/app/oracle/oradata/ora12c/ora12cpdb1/system01.dbf'

    重启动
    SQL>  startup force;
    ORACLE instance started.

    Total System Global Area  771751936 bytes
    Fixed Size                  8797536 bytes
    Variable Size             566231712 bytes
    Database Buffers          192937984 bytes
    Redo Buffers                3784704 bytes
    Database mounted.
    ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


    SQL> alter database open resetlogs;

    Database altered.

    关闭_allow_resetlogs_corruption
    SQL> alter system set "_allow_resetlogs_corruption"=false scope=spfile;

    System altered.

    打开数据库
    SQL> startup force;
    ORACLE instance started.

    Total System Global Area  771751936 bytes
    Fixed Size                  8797536 bytes
    Variable Size             566231712 bytes
    Database Buffers          192937984 bytes
    Redo Buffers                3784704 bytes
    Database mounted.
    Database opened.
    SQL>

  • 相关阅读:
    python模块--time模块
    python模块--如何相互调用自己写的模块
    Animating Views Using Scenes and Transitions
    fragment 切换
    android textview 设置text 字体
    android intent 5.1
    android EditView ime
    animation of android (4)
    animation of android (3)
    animation of android (2)
  • 原文地址:https://www.cnblogs.com/hxlasky/p/12022989.html
Copyright © 2011-2022 走看看