We have seen overview and prerequisites of fast-start failover in the previous post.

Fast Start Failover in Data Guard

Steps to configure fast start fail over .

Step 1 : Connect to dgmgrl and check the configuration

DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production

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

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle
Connected.
DGMGRL> show configuration;

Configuration - dgconfig1

  Protection Mode: MaxPerformance
  Databases:
    testdb     - Primary database
    std_testdb - Physical standby database
    
Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

Step 2 : set faststartfailovertarget property.

DGMGRL> EDIT DATABASE TESTDB SET PROPERTY FASTSTARTFAILOVERTARGET=STD_TESTDB;
Property "faststartfailovertarget" updated
DGMGRL> EDIT DATABASE STD_TESTDB SET PROPERTY FASTSTARTFAILOVERTARGET=TESTDB;
Property "faststartfailovertarget" updated

Step 3 : set protection mode if not already set using below syntax.

DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MaxAvailability;

Step 4: a set threshold value for fast-start failover

DGMGRL> edit configuration set property faststartfailoverthreshold=300;
Property "faststartfailoverthreshold" updated

Default value is 30 seconds.

Step 5 : Setting the LAG limit parameter.

As in my configuration Protection mode is Maximum Performance. I need to set FastStartFailoverLagLimit. Oracle data guard use this property as an acceptable lag-time limit in seconds. If standby database’s applied redo time exceeds this limit fast start failover is allowed.

Default value is 30 seconds , minimum value is 10 seconds.

Note : This parameter is ignored in Maximum Availibility mode.

DGMGRL> edit configuration set property faststartfailoverlaglimit=50;
Property "faststartfailoverlaglimit" updated

The maximum performance failover target must be within the specified lag limit of the primary database for the failover to be allowed. If the failover target is more than the specified lag limit behind the primary database, an error is returned.

Step 6: Set property FastStartFailoverPmyShutdown .

Default value is true. If you do not want to shut down Primary database database after fast start failover is triggered  as result of primary redo generation is stalled or primary database loosing connectivity with target standby and observer for more than the time specified by faststartfailoverthreshold  then we need to set it to false.

A value of TRUE causes the primary database to shut down with the ABORT option after the elapse of the number of seconds specified in the FASTSTARTFAILOVERTHRESHOLD property.

Step 7: Automatic reinstatement of database

DGMGRL> EDIT CONFIGURATION SET PROPERTY FASTSTARTFAILOVERAUTOREINSTATE=TRUE;
Property "faststartfailoverautoreinstate" updated

Step 8: Start observer

[oracle@localhost oradata]$ dgmgrl
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production

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

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@testdb
Connected.
DGMGRL> 
DGMGRL> 
DGMGRL> start observer;
Observer started

Step 9: Enable fast_start failover.

DGMGRL> enable fast_start failover;
Enabled.

Alert log when we enable Fast_Start Failover :

Fast-Start Failover (FSFO) has been enabled between:
  Primary = "testdb"
  Standby = "std_testdb"
Sat Jun 23 15:49:22 2018
FSFP started with pid=69, OS id=17552

Viewing Fast_start Failover.

DGMGRL> show fast_start failover;

Fast-Start Failover: ENABLED

  Threshold:          50 seconds
  Target:             std_testdb
  Observer:           test1.localdomain
  Lag Limit:          50 seconds (not in use)
  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 Offline               YES

  Oracle Error Conditions:
    (none)

We can check fast_start failover configuration from the v$database view.

SQL> SELECT fs_failover_status as STATUS,fs_failover_current_target as CURR_TGET,
fs_failover_threshold as THRESHOLD,fs_failover_observer_present as OBS_PRES,
fs_failover_observer_host as OBS_HOST
FROM v$database;   

STATUS		       CURR_TGET		       THRESHOLD OBS_PRE OBS_HOST
---------------------- ------------------------------ ---------- ------- ----------------
SYNCHRONIZED	       std_testdb			      50 YES	 test1.localdomain

We can see here fast_start failover status is synchronized. We can check status, current standby target, threshold value, an observer is present or not and from which host observer is running.

Stay tuned for More articles on Oracle DataGuard

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel: https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

 

 

About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.