DataGuard 切换流程梳理(二)-Broker fiailover

DG Failover一般作为数据库主库故障的应急处理,不保证备库数据完整性,请谨慎选择。

Failover之后不存在主库、备库关系。如主库可启动到Mount阶段,可在主库执行alter system flush redo to ‘备库’;确保主库online redo log内容同步到备库节点,最大限度上保证Failover前后数据不丢失。

[ora11g@]$ dgmgrl
DGMGRL for Linux: Version - 64bit Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys
DGMGRL> show configuration

Configuration - DG_Config

  Protection Mode: MaxPerformance
    ora1436b    - Primary database
    ora1436bstd - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
ORA-01034: ORACLE not available
ORA-16625: cannot reach database "ora1436b"
DGM-17017: unable to determine configuration status

DGMGRL> show database ora1436bstd

Database - ora1436bstd

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds (computed 105 seconds ago)
  Apply Lag:       0 seconds (computed 105 seconds ago)
  Apply Rate:      49.00 KByte/s
  Real Time Query: OFF

  Database Warning(s):
    ORA-16857: standby disconnected from redo source for longer than specified threshold

Database Status:

DGMGRL> failover to ora1436bstd
Performing failover NOW, please wait...
Failover succeeded, new primary is "ora1436bstd"

确认备库v$database视图 database_role是否为“primary ”并且观察alert日志是否出现异常报错信息。