由於Oracle DataGard Broker已經建置,  可在Standby failover開啟之後,  以下列流程re-initiate primary
----------------------------------------------------------------------
DGMGRL> connect sys/*********@STANDBY
DGMGRL> failover to 'standby'
Check the configuration again:
DGMGRL> show configuration
Configuration - broker1
  Protection Mode: MaxPerformance
  Members:
  standby - Primary database
    PRIMARY - Physical standby database (disabled)
      ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS   (status updated 53 seconds ago)
--Set Old Primary DB to mount status
SQL> startup mount
SQL> select db_unique_name,database_role,flashback_on from v$database;
DB_UNIQUE_NAME DATABASE_ROLE    FLASHBACK_ON
------------------------------ ---------------- ------------------
PRIMARY PRIMARY          YES
With the database in mount try a reinstate again:
PRIMARY>dgmgrl
DGMGRL> connect sys/*********@STANDBY
DGMGRL> reinstate database 'PRIMARY'
DGMGRL> validate database 'PRIMARY'
  Database Role:     Physical standby database
  Primary Database:  standby
  Ready for Switchover:  Yes
  Ready for Failover:    Yes (Primary Running)
  Current Log File Groups Configuration:
    Thread #  Online Redo Log Groups Standby Redo Log Groups Status
    (standby) (PRIMARY)
1 4 3 Insufficient SRLs
  Future Log File Groups Configuration:
    Thread #  Online Redo Log Groups Standby Redo Log Groups Status
(PRIMARY) (standby)
1 4 3 Insufficient SRLs
--如果validate database看到 Insufficient SRLs訊息代表沒有建立足夠的standby   logfile
alter database add standby logfile thread 1 group 4 size 536870912;
alter database add standby logfile thread 1 group 5 size 536870912;
alter database add standby logfile thread 1 group 6 size 536870912;
alter database add standby logfile thread 1 group 7 size 536870912;
----------------------------------------------------------------------
延伸閱讀
Oracle 11g DG Broker and Observer Health Conditions 設定步驟整理https://jaychu649.blogspot.com/2013/03/oracle-dg-broker-and-observer.html
Oracle DataGuard停止同步步驟(10g+)
https://jaychu649.blogspot.com/2018/05/oracle-dataguard10g.html
2 則留言:
張貼留言