Published by : Obay Salah , November 19, 2024

 Fast-Start Failover This feature has the ability to perform an automatic and automatic Failover and synchronize the Standby Database in the event of the loss of the Primary Database, all this without following the complex manual steps to perform a Failover. Also, after the Failover is over, the old Primary Database is automatically reconfigured to be a new Standby Database.


Fast-start failover works in the following cases:


1- Database instance failure


2- Shutdown abort


3- Datafiles taken offline due to I/O errors


4- When the Standby Database and Observe lose connection to the Primary Database.


Steps to configure Fast-start failover:


1- Make sure that the Standby Redo Logs are configured in both the Primary and Standby Database:

We talked previously about the Standby Redo Logs.


2- Configure the LogXptMode variable to take the value SYNC in the Primary and Standby Database:

DGMGRL> EDIT DATABASE 'PRIM' SET PROPERTY 'LogXptMode'='SYNC';
Property "LogXptMode" updated
DGMGRL> EDIT DATABASE 'STAN' SET PROPERTY 'LogXptMode'='SYNC';
Property "LogXptMode" updated


3- Define FastStartFailoverTarget:

You may have more than one Standby Database so configure the FastStartFailoverTarget variable in both the Primary and Standby Databases to point to each other.

DGMGRL> EDIT DATABASE 'PRIM' SET PROPERTY FastStartFailoverTarget='STAN';
Property "FastStartFailoverTarget" updated

DGMGRL> EDIT DATABASE 'STAN' SET PROPERTY FastStartFailoverTarget='PRIM';
Property "FastStartFailoverTarget" updated


4- Activate Real Time Apply:

 It is preferable to activate Real Time Apply in the Standby Database to reduce the Failover process time because the Redo Data is applied in the Standby Database as soon as it is received without waiting for the Log Switch in the Primary Database.

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
USING CURRENT LOGFILE;


5- Change the mode to MAX AVAILABILITY:

DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;


6- Make sure that the Flashback Database is activated:

Activate the Flashback Database in both the Primary and Standby Database because the Data Guard Broker is used to automatically restore the Primary Database to be a new Standby Database.

STARTUP MOUNT;
ALTER DATABASE FLASHBACK ON;
ALTER DATABASE OPEN;


7- To activate Fast Start Failover:

DGMGRL> ENABLE FAST_START FAILOVER;
Enabled.


8- Running the Observer:

This is known as the observer and it is better to be on a device other than the Primary or Standby Site and its task is to monitor the Primary and Standby Database, and it does not require it to be on the Instance device but only Oracle Client Administrator.

To run the observer, connect to Guard Configuration from the observer device and run the Observer.

DGMGRL> CONNECT sys/password@PRIMNET;
DGMGRL> START OBSERVER;
Observer started


9- Make sure that Fast Start Failover is configured:

DGMGRL> SHOW CONFIGURATION VERBOSE;
Configuration
 Name:                TEST
 Enabled:             YES
 Protection Mode:     MaxAvailability
 Fast-Start Failover: ENABLED
 Databases:
   PRIM - Primary database
   STAN    - Physical standby database
               - Fast-Start Failover target
Fast-Start Failover
 Threshold: 30 seconds
 Observer:  observer
Current status for "TEST":
SUCCESS


If we have finished configuring the fast start failover, now the Observer monitors both the Primary and Standby Database and if a problem occurs in the Primary Database, it will automatically failover after 30 seconds so that the STAN becomes a new Primary Database and tries to restore the PRIM to be a new Standby Database.

The time can be changed from 30 seconds to 45 seconds, for example, as follows:

DGMGRL> EDIT CONFIGURATION SET PROPERTY FastStartFailoverThreshold = 45;


Tags : Data Guard

You May Also Like

Comments

no comment yet!