Enable and Disable Fast-Start-Failover Data Guard Broker

 

Enable Fast-Start-Failover Data Guard Broker



Can be enabled automatic failover using Fast-Start-Failover Observer with Data Guard broker.

Configure FSFO

The StaticConnectIdentifier parameter must be set both in primary and standby

On primary(tansid_p1):

dgmgrl sys/sys@tansid_p1

DGMGRL> show database tansid_p1 StaticConnectIdentifier;
DGMGRL> show database tansid_p2 StaticConnectIdentifier;

SQL> ALTER SYSTEM SET LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.71)(PORT=1521))';


FastStartFailoverTarget: we need to pair physical standby with primary to let Fast Start Failover 

On primary (tansid_p1):
====================
dgmgrl sys/****@tansid_p1
DGMGRL> SHOW FAST_START FAILOVER
DGMGRL> EDIT DATABASE tansid_p1 SET PROPERTY FastStartFailoverTarget = 'tansid_p1';
DGMGRL> EDIT DATABASE proddb_p2 SET PROPERTY FastStartFailoverTarget = 'tansid_p2';
DGMGRL> show database verbose tansid_p1;
DGMGRL> show database verbose tansid_p2;

FastStartFailoverThreshold: Next we need to let broker know when to initiate automatic failover.
FSFO will wait before initiating failover

DGMGRL> EDIT CONFIGURATION SET PROPERTY FastStartFailoverThreshold=30;
DGMGRL> show fast_start failover

Define FastStartFailoverLagLimit: data we are ready to lose in case the Data Guard is in Max Performance Mode

DGMGRL> EDIT CONFIGURATION SET PROPERTY FastStartFailoverLagLimit = 30;

Enable FSFO: Now we can enable FSFO. Please keep in mind never start observer on production database

On Standby Server:


dgmgrl sys/****@tansid_p2

DGMGRL> ENABLE FAST_START FAILOVER;
DGMGRL> show configuration;
DGMGRL> start observer;


FSFO Configuration Test

Simulate failure: On tansid_p1, the current primary, shut abort the instance

On primary (tansid_p1):
===================
sqlplus / as sysdb
SQL> shut abort;

FSFO must perform automatic failover and tansid_p2 , check log files.

On new primary (tansid_p2):
===========================
sqlplus / as sysdba

SQL> select name, open_mode, db_unique_name from v$database;


Reinstate Failed Primary

Mount the failed primary (proddb) and it will auto reinstate. 

Do not open the database as it will be switched to physical standby

On failed primary (tansid_p1):
===========================
sqlplus / as sysdba
SQL> startup mount;

dgmgrl sys/***@tansid_p1
DGMGRL> show configuration;

Perform switchover to get back the original configuration

On current primary (proddb_st):
===============================
dgmgrl sys/sys@tansid_p2

DGMGRL> show configuration;
DGMGRL> switchover to tansid_p1


to Disable FSFO

dgmgrl sys/****@tansid_p2

DGMGRL> DISABLE FAST_START FAILOVER;

Stop observer:
==============

dgmgrl sys/****@tansid_p2

DGMGRL> stop observer;

Disabling FAST_START failover with FORCE option :

DGMGRL> show configuration;

Configuration - tansid_dgcnfg

Protection Mode: MaxAvailability
Databases:
tansid_p1- Primary database
Error: ORA-16820: fast-start failover observer is no longer observing this database

tansid_p2 - (*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated

Fast-Start Failover: ENABLED

Configuration Status:
ERROR


Checking Fast_start failover :
===============================

DGMGRL> show fast_start failover;

Fast-Start Failover: ENABLED

Threshold: 50 seconds
Target: testdb
Observer: shsebs121db01.appsol.com
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)


DGMGRL> disable fast_start failover;
Error: ORA-16652: fast-start failover target standby database is disabled

Failed.
We can see here it returns the error.

Stopping it with FORCE option.
===============================

DGMGRL> disable fast_start failover force;
Disabled.
DGMGRL>








Comments

Popular posts from this blog

How to drop index and before dropping it how to get the DDL.

PRVG-11250 : The check "RPM Package Manager database" was not performed because

ORA-00257:archiver error, connect internal only until freed

Verifying Daemon “Avahi-Daemon” Not Configured And Running …FAILED (PRVG-1360)

Linux OL7/RHEL7: PRVE-0421 : No entry exists in /etc/fstab for mounting /dev/shm

SKIP DNS RESLOV.CONF CHECK DURING RAC CONFIGURATION

CPU Patch Analysis

How to write to a CSV file using Oracle SQL*Plus

How to troubleshoot Long Running Concurrent Request in EBS 12.2

How To Manage Space of The FRA in the Oracle DB