• ORACLE Physical Standby DG 之fail over


    SQL> select thread#, low_sequence#, high_sequence# from v$archive_gap;
    确认下是否存在日志间隙,发现gap现象,说明failover不会有数据损失情况。
    在standby端,关闭apply和结束应用动作

    SQL> alter database recover managed standby database cancel;
    数据库已更改。

    SQL> alter database recover managed standby database finish;
    数据库已更改。

    SQL> select name, LOG_MODE, OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
    NAME LOG_MODE OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
    --------- ------------ -------------------- ---------------- -------------------- ------------------------------
    PROD ARCHIVELOG READ ONLY PHYSICAL STANDBY TO PRIMARY orcl

    SQL> alter database commit to switchover to primary with session shutdown;
    数据库已更改。

    SQL> select name, LOG_MODE, OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;

    NAME LOG_MODE OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
    --------- ------------ -------------------- ---------------- -------------------- ------------------------------
    PROD ARCHIVELOG MOUNTED PRIMARY NOT ALLOWED orcl


    SQL> alter database open;
    数据库已更改。

    SQL> select name, LOG_MODE, OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
    NAME LOG_MODE OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
    -------- ------------ -------------------- ---------------- -------------------- ------------------------------
    PROD ARCHIVELOG READ WRITE PRIMARY RESOLVABLE GAP orcl

    SQL>

    参考:https://www.cnblogs.com/lhrbest/p/4680273.html

  • 相关阅读:
    四套读写方案
    如何保证ArrayList线程安全
    异常总结<经典例题>
    java.移位运算符
    java反射机制
    面试题:return和finally执行
    Spring_通过注解配置 Bean(1)
    Spring_通过 FactoryBean 配置 Bean
    Spring_通过工厂方法配置 Bean
    Spring_管理 Bean 的生命周期
  • 原文地址:https://www.cnblogs.com/elontian/p/9675050.html
Copyright © 2020-2023  润新知