• RMAN还原问题


    一个1T的RAC数据库恢复到单机上,在恢复数据时出现如下报错:

    RMAN> recover database;

    Starting recover at 2021-01-21 05:18:12
    using channel ORA_DISK_1
    using channel ORA_DISK_2

    starting media recovery

    channel ORA_DISK_1: starting archived log restore to default destination
    channel ORA_DISK_1: restoring archived log
    archived log thread=2 sequence=148196
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111826
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111827
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111828
    channel ORA_DISK_1: restoring archived log
    archived log thread=2 sequence=148197
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111829
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111830
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111831
    channel ORA_DISK_1: reading from backup piece /backup/rman/202012/20201215_archfull_38955_1_1059193813
    channel ORA_DISK_1: piece handle=/backup/rman/202012/20201215_archfull_38955_1_1059193813 tag=TAG20201215T042342
    channel ORA_DISK_1: restored backup piece 1
    channel ORA_DISK_1: restore complete, elapsed time: 00:01:16
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111826_j0k7kf3b_.arc thread=1 sequence=111826
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148196_j0k7lcjb_.arc thread=2 sequence=148196
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111826_j0k7kf3b_.arc RECID=697111 STAMP=1062393556
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111827_j0k7k6x5_.arc thread=1 sequence=111827
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111827_j0k7k6x5_.arc RECID=697109 STAMP=1062393547
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111828_j0k7kg5z_.arc thread=1 sequence=111828
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148196_j0k7lcjb_.arc RECID=697114 STAMP=1062393563
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148197_j0k7lcn8_.arc thread=2 sequence=148197
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111828_j0k7kg5z_.arc RECID=697112 STAMP=1062393557
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111829_j0k7jq4p_.arc thread=1 sequence=111829
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111829_j0k7jq4p_.arc RECID=697107 STAMP=1062393516
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111830_j0k7kf2m_.arc thread=1 sequence=111830
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111830_j0k7kf2m_.arc RECID=697110 STAMP=1062393552
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111831_j0k7jq4d_.arc thread=1 sequence=111831
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148197_j0k7lcn8_.arc RECID=697113 STAMP=1062393558
    channel ORA_DISK_1: starting archived log restore to default destination
    channel ORA_DISK_1: restoring archived log
    archived log thread=2 sequence=148198
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111832
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111833
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111834
    channel ORA_DISK_1: restoring archived log
    archived log thread=2 sequence=148199
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111835
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111836
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111837
    channel ORA_DISK_1: restoring archived log
    archived log thread=2 sequence=148200
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111838
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111839
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111840
    channel ORA_DISK_1: restoring archived log
    archived log thread=2 sequence=148201
    channel ORA_DISK_1: restoring archived log
    archived log thread=1 sequence=111841
    channel ORA_DISK_1: restoring archived log
    archived log thread=2 sequence=148202
    channel ORA_DISK_1: reading from backup piece /backup/rman/202012/20201215_archfull_38956_1_1059193816
    channel ORA_DISK_1: piece handle=/backup/rman/202012/20201215_archfull_38956_1_1059193816 tag=TAG20201215T042342
    channel ORA_DISK_1: restored backup piece 1
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148198_j0k7ob00_.arc thread=2 sequence=148198
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111831_j0k7jq4d_.arc RECID=697108 STAMP=1062393517
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111832_j0k7nrjd_.arc thread=1 sequence=111832
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111832_j0k7nrjd_.arc RECID=697118 STAMP=1062393646
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111833_j0k7nrjm_.arc thread=1 sequence=111833
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111833_j0k7nrjm_.arc RECID=697117 STAMP=1062393646
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111834_j0k7nrjz_.arc thread=1 sequence=111834
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148198_j0k7ob00_.arc RECID=697129 STAMP=1062393656
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148199_j0k7ogfv_.arc thread=2 sequence=148199
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111834_j0k7nrjz_.arc RECID=697116 STAMP=1062393646
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111835_j0k7nrj5_.arc thread=1 sequence=111835
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111835_j0k7nrj5_.arc RECID=697125 STAMP=1062393652
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111836_j0k7nrkc_.arc thread=1 sequence=111836
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111836_j0k7nrkc_.arc RECID=697115 STAMP=1062393641
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111837_j0k7nrj9_.arc thread=1 sequence=111837
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148199_j0k7ogfv_.arc RECID=697127 STAMP=1062393655
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148200_j0k7og5l_.arc thread=2 sequence=148200
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111837_j0k7nrj9_.arc RECID=697120 STAMP=1062393650
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111838_j0k7nrhw_.arc thread=1 sequence=111838
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111838_j0k7nrhw_.arc RECID=697126 STAMP=1062393653
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111839_j0k7nrjj_.arc thread=1 sequence=111839
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111839_j0k7nrjj_.arc RECID=697119 STAMP=1062393647
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111840_j0k7ogoq_.arc thread=1 sequence=111840
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148200_j0k7og5l_.arc RECID=697128 STAMP=1062393655
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148201_j0k7ohph_.arc thread=2 sequence=148201
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111840_j0k7ogoq_.arc RECID=697124 STAMP=1062393650
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111841_j0k7ollw_.arc thread=1 sequence=111841
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148201_j0k7ohph_.arc RECID=697121 STAMP=1062393650
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_2_148202_j0k7oll1_.arc thread=2 sequence=148202
    channel default: deleting archived log(s)
    archived log file name=/u01/app/oracle/fast_recovery_area/PROC/archivelog/2021_01_21/o1_mf_1_111841_j0k7ollw_.arc RECID=697123 STAMP=1062393650
    unable to find archived log
    archived log thread=1 sequence=111842
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 01/21/2021 05:21:39
    RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 111842 and starting SCN of 21990542968

    RMAN> recover database until scn 21990542968;

    Starting recover at 2021-01-21 05:23:06
    using channel ORA_DISK_1
    using channel ORA_DISK_2

    starting media recovery
    media recovery complete, elapsed time: 00:00:00

    Finished recover at 2021-01-21 05:23:07

    RMAN> alter database open resetlogs;

    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of alter db command at 01/21/2021 05:23:30
    ORA-00349: failure obtaining block size for '+DATA/proc/onlinelog/redo01a.lo

    此处报错是由于redo log没有更改路径,运行如下命令更改redo的路径后可以正常执行恢复操作

    alter database rename file '+DATA/proc/onlinelog/redo01a.log' to '/u01/app/oracle/oradata/redo01a.log';
    alter database rename file '+FRA/proc/onlinelog/redo01b.log' to '/u01/app/oracle/oradata/redo01b.log';
    alter database rename file '+DATA/proc/onlinelog/redo03a.log' to '/u01/app/oracle/oradata/redo03a.log';
    alter database rename file '+DATA/proc/onlinelog/redo04a.log' to '/u01/app/oracle/oradata/redo04a.log';
    alter database rename file '+DATA/proc/onlinelog/redo02a.log' to '/u01/app/oracle/oradata/redo02a.log';
    alter database rename file '+FRA/proc/onlinelog/redo03b.log' to '/u01/app/oracle/oradata/redo03b.log';
    alter database rename file '+FRA/proc/onlinelog/redo02b.log' to '/u01/app/oracle/oradata/redo02b.log';
    alter database rename file '+DATA/proc/onlinelog/redo08a.log' to '/u01/app/oracle/oradata/redo08a.log';
    alter database rename file '+FRA/proc/onlinelog/redo04b.log' to '/u01/app/oracle/oradata/redo04b.log';
    alter database rename file '+DATA/proc/onlinelog/redo07a.log' to '/u01/app/oracle/oradata/redo07a.log';
    alter database rename file '+FRA/proc/onlinelog/redo07b.log' to '/u01/app/oracle/oradata/redo07b.log';
    alter database rename file '+DATA/proc/onlinelog/redo06a.log' to '/u01/app/oracle/oradata/redo06a.log';
    alter database rename file '+FRA/proc/onlinelog/redo06b.log' to '/u01/app/oracle/oradata/redo06b.log';
    alter database rename file '+DATA/proc/onlinelog/redo05a.log' to '/u01/app/oracle/oradata/redo05a.log';
    alter database rename file '+FRA/proc/onlinelog/redo05b.log' to '/u01/app/oracle/oradata/redo05b.log';
    alter database rename file '+FRA/proc/onlinelog/redo08b.log' to '/u01/app/oracle/oradata/redo08b.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_101a.log' to '/u01/app/oracle/oradata/std_redo_101a.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_201b.log' to '/u01/app/oracle/oradata/std_redo_201b.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_102a.log' to '/u01/app/oracle/oradata/std_redo_102a.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_202b.log' to '/u01/app/oracle/oradata/std_redo_202b.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_103a.log' to '/u01/app/oracle/oradata/std_redo_103a.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_203b.log' to '/u01/app/oracle/oradata/std_redo_203b.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_104a.log' to '/u01/app/oracle/oradata/std_redo_104a.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_204b.log' to '/u01/app/oracle/oradata/std_redo_204b.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_105a.log' to '/u01/app/oracle/oradata/std_redo_105a.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_205b.log' to '/u01/app/oracle/oradata/std_redo_205b.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_106a.log' to '/u01/app/oracle/oradata/std_redo_106a.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_206b.log' to '/u01/app/oracle/oradata/std_redo_206b.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_107a.log' to '/u01/app/oracle/oradata/std_redo_107a.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_207b.log' to '/u01/app/oracle/oradata/std_redo_207b.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_108a.log' to '/u01/app/oracle/oradata/std_redo_108a.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_208b.log' to '/u01/app/oracle/oradata/std_redo_208b.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_109a.log' to '/u01/app/oracle/oradata/std_redo_109a.log';
    alter database rename file '+DATA/proc/onlinelog/std_redo_209b.log' to '/u01/app/oracle/oradata/std_redo_209b.log';

    RMAN> recover database until scn 21990542968;

    Starting recover at 2021-01-21 06:46:08
    using channel ORA_DISK_1
    using channel ORA_DISK_2

    starting media recovery
    media recovery complete, elapsed time: 00:00:00

    Finished recover at 2021-01-21 06:46:09

    RMAN> alter database open resetlogs;

    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of alter db command at 01/21/2021 06:46:28
    ORA-00392: log 1 of thread 1 is being cleared, operation not allowed
    ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/redo01a.log'
    ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/redo01b.log'

    出现这个错误是redo创建失败,通过下面清理redo组后,恢复正常


    SQL> alter database clear logfile group 1;

    Database altered.

    SQL> alter database clear logfile group 2;

    Database altered.

    SQL> alter database clear logfile group 3;

    Database altered.

    SQL> alter database clear logfile group 4;

    Database altered.

    SQL> alter database clear logfile group 5;

    Database altered.

    SQL> alter database clear logfile group 6;

    Database altered.

    SQL> alter database clear logfile group 7;

    Database altered.

    SQL> alter database clear logfile group 8;

    Database altered.

    RMAN> recover database until scn 21990542968;

    Starting recover at 2021-01-21 07:38:51
    using channel ORA_DISK_1
    using channel ORA_DISK_2

    starting media recovery
    media recovery complete, elapsed time: 00:00:00

    Finished recover at 2021-01-21 07:38:52

    RMAN> alter database open resetlogs;

    database opened

  • 相关阅读:
    .天轰穿C# vs2010 04面向对象的编程之类的使用【原创】 20121217 10:55阅读(0).
    天轰穿C# vs2010 04面向对象的编程之“对象”【原创】
    天轰穿C#教程之变量的申明[原创]
    天轰穿C# vs2010 03C#的异常处理之编写更高质量的代码[原创]
    天轰穿C# vs2010 04面向对象的编程之类创建类库项目和项目属性【原创】
    天轰穿C# vs2010 03C#的异常处理之Finally关键字【原创】
    天轰穿C#教程之if语句【原创】
    天轰穿C#教程之布尔逻辑运算符【原创】
    天轰穿C#教程之值类型[原创]
    天轰穿C# vs2010 04面向对象的编程之生成和引用项目 【原创】
  • 原文地址:https://www.cnblogs.com/102x/p/14306232.html
Copyright © 2020-2023  润新知