• ORA-16171当DG出现GAP的时候,如何强制启动备库


    Copyright (c) 2022, Oracle. All rights reserved. Oracle Confidential.

    How to Perform Failover When GAP on Standby (Doc ID 846087.1)
    正在上传…重新上传取消To Bottom


    In this Document


    APPLIES TO:

    Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.3 [Release 10.2 to 11.2]
    Oracle Database Cloud Schema Service - Version N/A and later
    Oracle Database Exadata Express Cloud Service - Version N/A and later
    Oracle Database Exadata Cloud Machine - Version N/A and later
    Oracle Cloud Infrastructure - Database Service - Version N/A and later
    Information in this document applies to any platform. *** ***
    ***Checked for relevance on 10-Dec-2015***

    GOAL

    How to Perform Failover When GAP on Standby?

    If GAP is present then failover will fail with:

    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE;
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE
    *
    ERROR at line 1:
    ORA-00283: recovery session canceled due to errors
    ORA-16171: RECOVER...FINISH not allowed due to gap for thr 1, seq 4398-4398

    SOLUTION

    There are two ways to do this.

    1. Resolve the GAP
    2. Without resolving GAP


    1. Resolve the GAP

    a. If primary server is up then copy the missing log files to standby and then register them.


    SQL> ALTER DATABASE REGISTER LOGFILE '';

    example:

    SQL> ALTER DATABASE REGISTER LOGFILE '/tmp/arc_1652321.arc';


    b. Finish the recovery

    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE;


    c. Perform the failover

    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;


    d. If the physical standby database has been opened read-only since the instance was started, perform this step. Otherwise, skip to next step.

    SQL> STARTUP MOUNT FORCE;


    e. Set the protection mode to maximum performance and open the database for read/write access:

    SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;
    SQL> ALTER DATABASE OPEN;


    2. Without resolving GAP.

    a. Cancel managed recovery if it is working:

    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;


    If managed recovery is not working then this command will fails with:

    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL
    *
    ERROR at line 1:
    ORA-16136: Managed Standby Recovery not active


    b. Activate standby database:

    SQL> ALTER DATABASE ACTIVATE STANDBY DATABASE;

    Please be aware that you may have to recreate the standby database after activating the former standby database!
    For more details please see

    Oracle® Data Guard
    Concepts and Administration
    10g Release 2 (10.2)
    8.4 Recovering Through the OPEN RESETLOGS Statement


    c. If the physical standby database has been opened read-only since the instance was started, perform this step. Otherwise, skip to next step.

    SQL> STARTUP MOUNT FORCE;


    d. Set the protection mode to maximum performance and open the database for read/write access:

    SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;
    SQL> ALTER DATABASE OPEN;

  • 相关阅读:
    一文详解CAD与图新地球软件中提取高程点的方法图新地球
    内容安全(DPI和DFI解析)
    语文提高计划
    考研:研究生考试(五天学完)之《线性代数与空间解析几何》研究生学霸重点知识点总结之第二课矩阵及其运算
    【尚硅谷】Java数据结构与算法笔记02 - 队列
    java JUC并发编程 第九章 对象内存布局与对象头
    【C++】list容器模拟实现
    Diffusion-GAN: Training GANs with Diffusion 解读
    光模块故障的主要原因及解决办法
    2023年第九届数维杯国际大学生数学建模挑战赛A题
  • 原文地址:https://blog.csdn.net/su377486/article/details/127675624