-- Enable fast_start failover in Dataguard broker
-- Basic settings for fast_start failover
-- Troubleshoot : Error: ORA-16651: requirements not met for enabling fast-start failover
DGMGRL> ENABLE FAST_START FAILOVER;
Error: ORA-16651: requirements not met for enabling fast-start failover
Failed.
There are various causes not to start fast-start failover. If swich-over is happening properly, then following issues may be the cause. Go through the following steps to troubleshoot.
Be sure of following settings:
1) Ensure standby redo logs are configured on the primary and target standby databases.
2) Ensure the LogXptMode Property is set to SYNC.
3) Set the FastStartFailoverTarget configuration property.
4) Upgrade the protection mode to MAXAVAILABILITY, if necessary.
5) Enable Flashback Database on the primary and target standby databases.
6) Start the observer
Creating three issues both in Primary and standby database for scenarios testing and issue fixing:
In primary See status:
DGMGRL> show FAST_START FAILOVER;
Fast-Start Failover: DISABLED
Threshold: 30 seconds
Target: (none)
Observer: edc-noc-01d
Lag Limit: 30 seconds
Shutdown Primary: TRUE
Auto-reinstate: TRUE
Configurable Failover Conditions
Health Conditions:
Corrupted Controlfile YES
Corrupted Dictionary YES
Inaccessible Logfile NO
Stuck Archiver NO
Datafile Offline YES
Oracle Error Conditions:
(none)
If above are OK, then proceed following steps.
1) Check whether the flashback database is enabled on primary & standby database
Select flashback_on from gv$database;
PRIMARY]
SQL> Select flashback_on from gv$database;
FLASHBACK_ON
------------------
YES
STANDBY]
SQL> Select flashback_on from gv$database;
FLASHBACK_ON
------------------
NO
So, Now cancel MRP and enable flashback. Follow the below steps:
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database flashback on;
Database altered.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
Database altered.
2) Check whether you have set the FastStartFailoverTarget parameter.
PRIMARY]
Using dgmgrl prompt, check database in verbose mode and look at "FastStartFailoverTarget" value. Found set as STANDBY
FastStartFailoverTarget = 'STANDBY' -- is set
Do the same thing in STANDBY side.
STANDBY]
FastStartFailoverTarget = ' ' -- is not set
Then do the following using dgmgrl prompt.
edit database 'PRIMARY' set property FastStartFailoverTarget='STANDBY'; --- in primary side
edit database 'STANDBY' set property FastStartFailoverTarget='PRIMARY'; --- in standby side
Example:
DGMGRL> edit database 'STANDBY' set property FastStartFailoverTarget='PRIMARY';
Property "faststartfailovertarget" updated
DGMGRL>
Now, STANDBY]
FastStartFailoverTarget = 'PRIMARY'
Now you go ahead to start :
3) CHeck LogXptMode both in Primary & Standby:
PRIMARY]
LogXptMode = 'ASYNC' -- Needs to Change as 'SYNC'
STANDBY]
LogXptMode = 'SYNC'
-- Edit in primary database.
DGMGRL> connect sys@PRIMARY;
Password:
Connected.
DGMGRL>
DGMGRL> EDIT DATABASE 'PRIMARY' SET PROPERTY 'LogXptMode'='SYNC';
Property "LogXptMode" updated.
Now Cross-check and start "FAST_START FAILOVER":
DGMGRL> show FAST_START FAILOVER;
Fast-Start Failover: DISABLED
Threshold: 30 seconds
Target: (none)
Observer: edc-noc-01d
Lag Limit: 30 seconds
Shutdown Primary: TRUE
Auto-reinstate: TRUE
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> ENABLE FAST_START FAILOVER; <--Here is your success story
Enabled.
DGMGRL> show FAST_START FAILOVER;
Fast-Start Failover: ENABLED
Threshold: 30 seconds
Target: STANDBY
Observer: edc-noc-01d
Lag Limit: 30 seconds (not in use)
Shutdown Primary: TRUE
Auto-reinstate: TRUE
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>
-- Basic settings for fast_start failover
-- Troubleshoot : Error: ORA-16651: requirements not met for enabling fast-start failover
DGMGRL> ENABLE FAST_START FAILOVER;
Error: ORA-16651: requirements not met for enabling fast-start failover
Failed.
There are various causes not to start fast-start failover. If swich-over is happening properly, then following issues may be the cause. Go through the following steps to troubleshoot.
Be sure of following settings:
1) Ensure standby redo logs are configured on the primary and target standby databases.
2) Ensure the LogXptMode Property is set to SYNC.
3) Set the FastStartFailoverTarget configuration property.
4) Upgrade the protection mode to MAXAVAILABILITY, if necessary.
5) Enable Flashback Database on the primary and target standby databases.
6) Start the observer
Creating three issues both in Primary and standby database for scenarios testing and issue fixing:
In primary See status:
DGMGRL> show FAST_START FAILOVER;
Fast-Start Failover: DISABLED
Threshold: 30 seconds
Target: (none)
Observer: edc-noc-01d
Lag Limit: 30 seconds
Shutdown Primary: TRUE
Auto-reinstate: TRUE
Configurable Failover Conditions
Health Conditions:
Corrupted Controlfile YES
Corrupted Dictionary YES
Inaccessible Logfile NO
Stuck Archiver NO
Datafile Offline YES
Oracle Error Conditions:
(none)
If above are OK, then proceed following steps.
1) Check whether the flashback database is enabled on primary & standby database
Select flashback_on from gv$database;
PRIMARY]
SQL> Select flashback_on from gv$database;
FLASHBACK_ON
------------------
YES
STANDBY]
SQL> Select flashback_on from gv$database;
FLASHBACK_ON
------------------
NO
So, Now cancel MRP and enable flashback. Follow the below steps:
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database flashback on;
Database altered.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
Database altered.
2) Check whether you have set the FastStartFailoverTarget parameter.
PRIMARY]
Using dgmgrl prompt, check database in verbose mode and look at "FastStartFailoverTarget" value. Found set as STANDBY
FastStartFailoverTarget = 'STANDBY' -- is set
Do the same thing in STANDBY side.
STANDBY]
FastStartFailoverTarget = ' ' -- is not set
Then do the following using dgmgrl prompt.
edit database 'PRIMARY' set property FastStartFailoverTarget='STANDBY'; --- in primary side
edit database 'STANDBY' set property FastStartFailoverTarget='PRIMARY'; --- in standby side
Example:
DGMGRL> edit database 'STANDBY' set property FastStartFailoverTarget='PRIMARY';
Property "faststartfailovertarget" updated
DGMGRL>
Now, STANDBY]
FastStartFailoverTarget = 'PRIMARY'
Now you go ahead to start :
3) CHeck LogXptMode both in Primary & Standby:
PRIMARY]
LogXptMode = 'ASYNC' -- Needs to Change as 'SYNC'
STANDBY]
LogXptMode = 'SYNC'
-- Edit in primary database.
DGMGRL> connect sys@PRIMARY;
Password:
Connected.
DGMGRL>
DGMGRL> EDIT DATABASE 'PRIMARY' SET PROPERTY 'LogXptMode'='SYNC';
Property "LogXptMode" updated.
Now Cross-check and start "FAST_START FAILOVER":
DGMGRL> show FAST_START FAILOVER;
Fast-Start Failover: DISABLED
Threshold: 30 seconds
Target: (none)
Observer: edc-noc-01d
Lag Limit: 30 seconds
Shutdown Primary: TRUE
Auto-reinstate: TRUE
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> ENABLE FAST_START FAILOVER; <--Here is your success story
Enabled.
DGMGRL> show FAST_START FAILOVER;
Fast-Start Failover: ENABLED
Threshold: 30 seconds
Target: STANDBY
Observer: edc-noc-01d
Lag Limit: 30 seconds (not in use)
Shutdown Primary: TRUE
Auto-reinstate: TRUE
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>
Now issue are fixed. Please check in your databases. If you are facing issues again please go though the below PRIMRY database status :
PRIMARY]
DGMGRL> show database verbose 'PRIMARY';
Database - PRIMARY
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
PRIMARY
Properties:
DGConnectIdentifier = 'primary'
ObserverConnectIdentifier = ''
LogXptMode = 'SYNC'
DelayMins = '0'
Binding = 'optional'
MaxFailure = '0'
MaxConnections = '1'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
PreferredApplyInstance = ''
ApplyInstanceTimeout = '0'
ApplyParallel = 'AUTO'
StandbyFileManagement = 'AUTO'
ArchiveLagTarget = '0'
LogArchiveMaxProcesses = '30'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert = '/u09/PRIMAY/ORADATA/PRIMARY/, /u10/STANDBY/ORADATA/STAN
LogFileNameConvert = '/u09/PRIMAY/ORADATA/PRIMARY/, /u10/STANDBY/ORADATA/STAN
FastStartFailoverTarget = 'STANDBY'
InconsistentProperties = '(monitor)'
InconsistentLogXptProps = '(monitor)'
SendQEntries = '(monitor)'
LogXptStatus = '(monitor)'
RecvQEntries = '(monitor)'
SidName = 'PRIMARY'
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=EH-UAT-DB)(PO
CT_DATA=(SERVICE_NAME=PRIMARY_DGMGRL)(INSTANCE_NAME=PRIMARY)(SERVER=DEDICATED)))'
StandbyArchiveLocation = '/u09/PRIMAY/FRA/archivelogs'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = '%t_%s_%r.dbf'
TopWaitEvents = '(monitor)'
Database Status:
SUCCESS
DGMGRL>
STANDBY]
DGMGRL> connect sys@STANDBY;
Password:
Connected.
DGMGRL> show database verbose 'STANDBY';
Database - STANDBY
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds
Apply Lag: 0 seconds
Real Time Query: OFF
Instance(s):
STANDBY
Properties:
DGConnectIdentifier = 'standby'
ObserverConnectIdentifier = ''
LogXptMode = 'SYNC'
DelayMins = '0'
Binding = 'OPTIONAL'
MaxFailure = '0'
MaxConnections = '1'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
PreferredApplyInstance = ''
ApplyInstanceTimeout = '0'
ApplyParallel = 'AUTO'
StandbyFileManagement = 'AUTO'
ArchiveLagTarget = '0'
LogArchiveMaxProcesses = '4'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert = '/u09/PRIMAY/ORADATA/PRIMARY/, /u10/STANDBY/ORADATA/PRIMARY/'
LogFileNameConvert = '/u09/PRIMAY/ORADATA/PRIMARY/, /u10/STANDBY/ORADATA/PRIMARY/'
FastStartFailoverTarget = 'PRIMARY'
InconsistentProperties = '(monitor)'
InconsistentLogXptProps = '(monitor)'
SendQEntries = '(monitor)'
LogXptStatus = '(monitor)'
RecvQEntries = '(monitor)'
SidName = 'STANDBY'
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=eh-uatdb1)(PORT=1521))(CONNE
CT_DATA=(SERVICE_NAME=STANDBY_DGMGRL)(INSTANCE_NAME=STANDBY)(SERVER=DEDICATED)))'
StandbyArchiveLocation = '/u10/STANDBY/FRA/archivelogs'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = '%t_%s_%r.dbf'
TopWaitEvents = '(monitor)'
Database Status:
SUCCESS
DGMGRL>
You can proceed for FAILOVER and SWITCHOVER operations. If you are facing any issues, you can send comments/ requests to me.
Cheers !!!
Cheers !!!
Great and detailed article.
ReplyDeleteThank you