Description:-
We have already enabled the Fast Start Failover,now we are going to testing the Failover.
- Oracle 19c-Configure Oracle Data Guard Fast-Start Failover Click Here
Environment Details:-
Let’s Start the Demo:-
Step1:-Show the configuration
DGMGRL> SHOW CONFIGURATION;
Configuration – hari
Protection Mode: MaxAvailability
Members:
chennai – Primary database
delhi – (*) Physical standby database
Fast-Start Failover: Enabled in Zero Data Loss Mode
Configuration Status:
SUCCESS (status updated 43 seconds ago)
Step2:-check the observer session is running to monitor the primary & standby
[oracle@dev19c CHENNAI]$ export ORACLE_SID=chennai
[oracle@dev19c CHENNAI]$ dgmgrl
DGMGRL for Linux: Release 19.0.0.0.0 – Production on Sat Oct 26 23:36:34 2019
Version 19.4.1.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Welcome to DGMGRL, type “help” for information.
DGMGRL> connect sys/oracle@chennai
Connected to “CHENNAI”
Connected as SYSDBA.
DGMGRL> enable fast_start failover;
Enabled in Zero Data Loss Mode.
DGMGRL> start observer;
[W000 2019-10-26T23:38:06.076+05:30] FSFO target standby is delhi
Observer ‘dev19c’ started
[W000 2019-10-26T23:38:06.983+05:30] Observer trace level is set to USER
[W000 2019-10-26T23:38:06.983+05:30] Try to connect to the primary.
[W000 2019-10-26T23:38:06.983+05:30] Try to connect to the primary chennai.
[W000 2019-10-26T23:38:07.030+05:30] The standby delhi is ready to be a FSFO target
[W000 2019-10-26T23:38:08.030+05:30] Connection to the primary restored!
[W000 2019-10-26T23:38:10.046+05:30] Disconnecting from database chennai.
SQL> select name,FS_FAILOVER_STATUS,FS_FAILOVER_OBSERVER_PRESENT from v$database;
NAME FS_FAILOVER_STATUS FS_FAIL
——— ——————- ——-
CHENNAI SYNCHRONIZED YES
Step3:-kill the Smon process in primary database
To simulate a fast start failover,i will kill the smon proceess in primary database so that it looses the connectivity with the observer and the standby database.
[oracle@dev19c ~]$ ps -ef|grep smon
oracle 25405 1 0 Oct26 ? 00:00:00 ora_smon_chennai
oracle 51611 11950 0 00:01 pts/0 00:00:00 grep –color=auto smon
[oracle@dev19c ~]$ kill -9 25405
Step4:- Check observer session for the failover
DGMGRL> enable fast_start failover;
Enabled in Zero Data Loss Mode.
DGMGRL> start observer;
[W000 2019-10-26T23:38:06.076+05:30] FSFO target standby is delhi
Observer ‘dev19c’ started
[W000 2019-10-26T23:38:06.983+05:30] Observer trace level is set to USER
[W000 2019-10-26T23:38:06.983+05:30] Try to connect to the primary.
[W000 2019-10-26T23:38:06.983+05:30] Try to connect to the primary chennai.
[W000 2019-10-26T23:38:07.030+05:30] The standby delhi is ready to be a FSFO target
[W000 2019-10-26T23:38:08.030+05:30] Connection to the primary restored!
[W000 2019-10-26T23:38:10.046+05:30] Disconnecting from database chennai.
[W000 2019-10-27T00:02:15.673+05:30] Primary database cannot be reached.
[W000 2019-10-27T00:02:15.673+05:30] Fast-Start Failover threshold has not exceeded. Retry for the next 30 seconds
[W000 2019-10-27T00:02:16.674+05:30] Try to connect to the primary.
[W000 2019-10-27T00:02:18.029+05:30] Primary database cannot be reached.
[W000 2019-10-27T00:02:19.030+05:30] Try to connect to the primary.
[W000 2019-10-27T00:02:44.179+05:30] Primary database cannot be reached.
[W000 2019-10-27T00:02:44.179+05:30] Fast-Start Failover threshold has not exceeded. Retry for the next 1 second
[W000 2019-10-27T00:02:45.180+05:30] Try to connect to the primary.
[W000 2019-10-27T00:02:46.538+05:30] Primary database cannot be reached.
[W000 2019-10-27T00:02:46.538+05:30] Fast-Start Failover threshold has expired.
[W000 2019-10-27T00:02:46.538+05:30] Try to connect to the standby.
[W000 2019-10-27T00:02:46.538+05:30] Making a last connection attempt to primary database before proceeding with Fast-Start Failover.
[W000 2019-10-27T00:02:46.538+05:30] Check if the standby is ready for failover.
[S002 2019-10-27T00:02:46.562+05:30] Fast-Start Failover started…
2019-10-27T00:02:46.562+05:30
Initiating Fast-Start Failover to database “delhi”…
[S002 2019-10-27T00:02:46.563+05:30] Initiating Fast-start Failover.
Performing failover NOW, please wait…
Failover succeeded, new primary is “delhi”
Step5:-Automatically Initiating the reinstate command in observer session.
(just open or mount the old primary database)
SQL> startup
ORACLE instance started.
Total System Global Area 1048575776 bytes
Fixed Size 8904480 bytes
Variable Size 339738624 bytes
Database Buffers 696254464 bytes
Redo Buffers 3678208 bytes
Database mounted.
ORA-16649: possible failover to another database prevents this database from
being opened
Observer session.
2019-10-27T00:05:52.261+05:30
Initiating reinstatement for database “chennai”…
Reinstating database “chennai”, please wait…
[W000 2019-10-27T00:06:11.418+05:30] The standby chennai is ready to be a FSFO target
Reinstatement of database “chennai” succeeded
2019-10-27T00:06:42.550+05:30
[W000 2019-10-27T00:06:42.611+05:30] Successfully reinstated database chennai.
Step6:-show the configuration
DGMGRL> connect sys/oracle@chennai
Connected to “CHENNAI”
Connected as SYSDBA.
DGMGRL> show configuration;
Configuration – hari
Protection Mode: MaxAvailability
Members:
delhi – Primary database
chennai – (*) Physical standby database
Fast-Start Failover: Enabled in Zero Data Loss Mode
Configuration Status:
SUCCESS (status updated 60 seconds ago)
Successfully Tested the Oracle 19c Data Guard Fast-Start Failover.
Connect with me:-
Telegram App:https://t.me/oracledbwr
LinkedIn:https://www.linkedin.com/in/hariprasathdba
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page : https://www.facebook.com/dbahariprasath/?
Twitter : https://twitter.com/hariprasathdba