zoukankan      html  css  js  c++  java
  • 非正常关机REDOLOG损坏数据库无法正常打开

    测试库服务器由于非正常关机,导致数据库无法正常打开,查看alert日志如下:

    Mon May 25 15:36:51 2020
    alter database mount
    Mon May 25 15:36:55 2020
    Successful mount of redo thread 1, with mount id 2938166995
    Database mounted in Exclusive Mode
    Lost write protection disabled
    Completed: alter database mount
    Mon May 25 15:37:10 2020
    alter database open
    Mon May 25 15:37:10 2020
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_lgwr_5557.trc:
    ORA-00322: log 1 of thread 1 is not current copy
    ORA-00312: online log 1 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo01.rdo'
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_lgwr_5557.trc:
    ORA-00322: log 1 of thread 1 is not current copy
    ORA-00312: online log 1 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo01.rdo'
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_ora_5568.trc:
    ORA-00322: log 1 of thread is not current copy
    ORA-00312: online log 1 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo01.rdo'
    USER (ospid: 5568): terminating the instance due to error 322
    Mon May 25 15:37:10 2020
    System state dump requested by (instance=1, osid=5568), summary=[abnormal instance termination].
    System State dumped to trace file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_diag_5547_20200525153710.trc
    Dumping diagnostic data in directory=[cdmp_20200525153710], requested by (instance=1, osid=5568), summary=[abnormal instance termination].
    Instance terminated by USER, pid = 5568

    /opt/oradata/SCPRDI1/SCPRDI1_redo01.rdo  redo日志文件损坏了  

    处理方法:

    1、shutdown  immediate;
    2、startup mount;
    3、alter database clear logfile /opt/oradata/SCPRDI1/SCPRDI1_redo01.rdo';
    4、alter database open;

    又出现如下报错,日志文件都损坏了。
    Mon May 25 15:43:21 2020
    alter database open
    Mon May 25 15:43:22 2020
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_lgwr_5605.trc:
    ORA-00322: log 2 of thread 1 is not current copy
    ORA-00312: online log 2 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo02.rdo'
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_lgwr_5605.trc:
    ORA-00322: log 2 of thread 1 is not current copy
    ORA-00312: online log 2 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo02.rdo'
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_ora_5621.trc:
    ORA-00322: log 1 of thread is not current copy
    ORA-00312: online log 2 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo02.rdo'
    USER (ospid: 5621): terminating the instance due to error 322
    Mon May 25 15:43:22 2020
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_m000_5652.trc:
    ORA-00322: log 2 of thread 1 is not current copy
    ORA-00312: online log 2 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo02.rdo'
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_m000_5652.trc:
    ORA-00322: log 3 of thread 1 is not current copy
    ORA-00312: online log 3 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo03.rdo'
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_m000_5652.trc:
    ORA-00322: log 4 of thread 1 is not current copy
    ORA-00312: online log 4 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo04.rdo'
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_m000_5652.trc:
    ORA-00322: log 5 of thread 1 is not current copy
    ORA-00312: online log 5 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo05.rdo'
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_m000_5652.trc:
    ORA-00322: log 6 of thread 1 is not current copy
    ORA-00312: online log 6 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo06.rdo'
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_m000_5652.trc:
    ORA-00322: log 7 of thread 1 is not current copy
    ORA-00312: online log 7 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo07.rdo'
    Errors in file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_m000_5652.trc:
    ORA-00322: log 8 of thread 1 is not current copy
    ORA-00312: online log 8 thread 1: '/opt/oradata/SCPRDI1/SCPRDI1_redo08.rdo'
    Checker run found 14 new persistent data failures
    Mon May 25 15:43:22 2020
    System state dump requested by (instance=1, osid=5621), summary=[abnormal instance termination].
    System State dumped to trace file /oracle/app/diag/rdbms/scprdi1/SCPRDI1/trace/SCPRDI1_diag_5595_20200525154322.trc
    Dumping diagnostic data in directory=[cdmp_20200525154322], requested by (instance=1, osid=5621), summary=[abnormal instance termination].
    Instance terminated by USER, pid = 5621

    将其余redo日志文件clear后,正常open。

    alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo02.rdo'
    Clearing online log 2 of thread 1 sequence number 2
    Mon May 25 15:47:29 2020
    Warning: VKTM detected a time drift.
    Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.
    Completed: alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo02.rdo'
    Mon May 25 15:47:34 2020
    alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo03.rdo'
    Clearing online log 3 of thread 1 sequence number 3
    Completed: alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo03.rdo'
    Mon May 25 15:47:45 2020
    alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo04.rdo'
    Thread 1 advanced to log sequence 5 (preparation to clear logfile)
    Clearing online log 4 of thread 1 sequence number 4
    Completed: alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo04.rdo'
    Mon May 25 15:47:57 2020
    alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo05.rdo'
    Clearing online log 5 of thread 1 sequence number 0
    Completed: alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo05.rdo'
    Mon May 25 15:48:07 2020
    alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo06.rdo'
    Clearing online log 6 of thread 1 sequence number 0
    Completed: alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo06.rdo'
    Mon May 25 15:48:18 2020
    alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo07.rdo'
    Clearing online log 7 of thread 1 sequence number 0
    Completed: alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo07.rdo'
    Mon May 25 15:48:32 2020
    alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo08.rdo'
    Clearing online log 8 of thread 1 sequence number 0
    Completed: alter database clear logfile '/opt/oradata/SCPRDI1/SCPRDI1_redo08.rdo'
    Mon May 25 15:48:56 2020
    alter database open
    Mon May 25 15:48:56 2020
    Thread 1 opened at log sequence 5
    Current log# 1 seq# 5 mem# 0: /opt/oradata/SCPRDI1/SCPRDI1_redo01.rdo
    Successful open of redo thread 1

    非正常关闭的active和current的日志是不能被clear的,但所有的日志组都clear成功了。这个测试库用的极少,难道是当时没有任何数据库操作的原因,再做实验来看看吧。

    参考文章

    Redo丢失的4种情况及处理方法 http://blog.itpub.net/23135684/viewspace-626935/

  • 相关阅读:
    什么是大小端
    mina
    出现jar包找不到的问题解决方案
    InnoDB 静态数据加密的常见问题合集
    mysqldump 数据库备份程序,mysqldump 选项合集
    出现The MySQL server is running with the --secure-file-priv option so it cannot问题的原因
    小睡一会,做了一个梦
    IntelliJ IDEA is a solution that appears after importing a project with a clock icon(idea导入项目之后出现时钟的解决方案)
    IntelliJIDE不显示项目文件夹的问题
    夏天的记忆
  • 原文地址:https://www.cnblogs.com/historynote/p/12957612.html
Copyright © 2011-2022 走看看