Description:-
- This feature increases the availability of the database by eliminating the need for DBA involvement as part of the failover process.
- Fast-Start Failover enables the broker to perform these tasks automatically failover to standby database
- The key to this feature is a monitoring process appropriately named the Observer.
- The Observer is a component of the DGMGRL interface that is configured on a system outside the systems actually running the Oracle Data Guard configuration, which monitors the availability of the primary database.
- it will issue a failover after waiting the number of seconds specified by the FastStartFailoverThreshold property
Some of the below circumstance it will start Failover
Datafile Offline Failover is initiated if a datafile on the primary database experiences an I/O error resulting in a datafile being taken offline. This option is enabled by default.
Corrupted Dictionary Failover is initiated if corruption of a critical database object is found. This option is enabled by default.
Corrupted Controlfile Enabled by default, the detection of controlfile corruption will result in immediate failover.
Inaccessible Log File This parameter, disabled by default, allows for failover to be initiated in the event that LGWR is unable to write to a member of a log group.
Stuck Archiver Failover is initiated should the archiver on the primary database become hung. The default setting of this parameter is disabled.
Enable the Fast-Start Failover, Oracle Data Guard configuration must meet the following requirements:
1)Flashback Database must be enabled for both the primary and standby database target.
select flashback_on from v$database;
FLASHBACK_ON
——————
YES
2. An observer server (server outside of the Oracle Data Guard configuration) should be established to monitor the environment.
See the below URL’s for Dataguard configuration
Step by Step Configuration Of Data Guard Broker in Oracle 19c Click Here
Oracle 19c-Performing Dataguard Switchover Using DGMGRL Utility Click Here
Oracle 19c-Performing Dataguard Failover Using DGMGRL Utility Click Here
Oracle 19c-Performing Reinstating A Failed Primary Database Using DGMGRL Utility Click Here
Oracle 19c-Converting Physical Standby database to Snapshot Standby database using DGMGRL Utility Click Here
Environment Details:-
Let’s start the Demo:-
Note:-Before enable the Fast start Failover we need configure the dataguard broker
Step by Step Configuration Of Data Guard Broker in Oracle 19c Click Here
Step1:-Show the Configuration
DGMGRL> SHOW CONFIGURATION;
Configuration – hari
Protection Mode: MaxAvailability
Members:
chennai – Primary database
delhi – Physical standby database
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS (status updated 31 seconds ago)
Step2:-Enabling Fast-Start Failover
(changing the Maximum Performance mode to Max Availability mode)-Already our Database’s in MAXAVAILABILITY. Follow the below steps to change PROTECTION MODE
Fast-start failover can be enabled for either maximum availability mode or maximum performance mode
DGMGRL> EDIT DATABASE ‘chennai’ SET PROPERTY ‘LogXptMode’=’SYNC’;
Property “LogXptMode” updated
DGMGRL> EDIT DATABASE ‘delhi’ SET PROPERTY ‘LogXptMode’=’SYNC’;
Property “LogXptMode” updated
DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;
Succeeded.
Step3:- Check the Data Guard Protection Modes
DGMGRL> show configuration verbose;
Configuration – hari
Protection Mode: MaxAvailability
Members:
chennai – Primary database
delhi – Physical standby database
Properties:
FastStartFailoverThreshold = ’30’
OperationTimeout = ’30’
TraceLevel = ‘USER’
FastStartFailoverLagLimit = ‘0’
CommunicationTimeout = ‘180’
ObserverReconnect = ‘0’
FastStartFailoverAutoReinstate = ‘TRUE’
FastStartFailoverPmyShutdown = ‘TRUE’
BystandersFollowRoleChange = ‘ALL’
ObserverOverride = ‘FALSE’
ExternalDestination1 = ”
ExternalDestination2 = ”
PrimaryLostWriteAction = ‘CONTINUE’
ConfigurationWideServiceName = ‘chennai_CFG’
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS
Step4:-Enable the observer
- The observer is integrated in the DGMGRL client-side component of the broker and typically runs on a different computer from the primary or standby databases and from the computer where you manage the broker configuration.
- Idealy we need to configure the observer should be started on another host, to observe the primary, as if the host goes down it can monitor the outage and do specify actions.
- Note:-we start the observer in primary node here(192.168.125.155-primary) I am not configure 3 node for the observer)
Open in Another Terminal in primary side
[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.
The session will seem to hang. You can do a control C. Or create and run the script as nohup. (other way to start the observer)
Other way to start in background
nohup dgmgrl sys/oracle@orcl “start observer file=’/home/oracle/fsfo.dat’” -logfile $HOME/observer.log &
Step5:-check the fast start failover status
DGMGRL> connect sys/oracle@chennai
Connected to “CHENNAI”
Connected as SYSDBA.
DGMGRL> show fast_start failover
Fast-Start Failover: Enabled in Zero Data Loss Mode
Protection Mode: MaxAvailability
Lag Limit: 0 seconds
Threshold: 30 seconds
Active Target: delhi
Potential Targets: “delhi”
delhi valid
Observer: dev19c
Shutdown Primary: TRUE
Auto-reinstate: TRUE
Observer Reconnect: (none)
Observer Override: FALSE
Configurable Failover Conditions
Health Conditions:
Corrupted Controlfile YES
Corrupted Dictionary YES
Inaccessible Logfile NO
Stuck Archiver NO
Datafile Write Errors YES
Oracle Error Conditions:
(none)
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)
Successfully configured 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