Enable & Test Fast Start Failover:
[oracle@collabn2 admin]$ dgmgrl
DGMGRL for Linux: Version 11.2.0.1.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/XXXXXX
Connected.
DGMGRL> show configuration
Configuration - DG_PROD
Protection Mode: MaxAvailability
Databases:
msft - Primary database
orcl - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
For FastStartFailover set the property FastStartFailoverTarget :
DGMGRL> show database 'orcl' FastStartFailoverTarget
FastStartFailoverTarget = ''
DGMGRL> show database 'msft' FastStartFailoverTarget
FastStartFailoverTarget = ''
DGMGRL> edit database 'orcl' set property FastStartFailoverTarget=msft;
Property "faststartfailovertarget" updated
DGMGRL> edit database 'msft' set property FastStartFailoverTarget=orcl;
Property "faststartfailovertarget" updated
DGMGRL> show database 'msft' FastStartFailoverTarget
FastStartFailoverTarget = 'orcl'
DGMGRL> show database 'orcl' FastStartFailoverTarget
FastStartFailoverTarget = 'msft'
DGMGRL>
Verify LogXptMode is SYNC:
DGMGRL> show database 'orcl' LogXptMode
LogXptMode = 'SYNC'
DGMGRL> show database 'msft' LogXptMode
LogXptMode = 'SYNC'
Start Observer: <- Remember after you start the observer CTRL will not be returned
DGMGRL>
DGMGRL> start observer
Observer started
Enable FAST START FAILOVER:
DGMGRL> show configuration
Configuration - DG_PROD
Protection Mode: MaxAvailability
Databases:
msft - Primary database
orcl - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL> show configuration verbose
Configuration - DG_PROD
Protection Mode: MaxAvailability
Databases:
msft - Primary database
orcl - (*) Physical standby database
(*) Fast-Start Failover target
Fast-Start Failover: ENABLED
Threshold: 30 seconds
Target: orcl
Observer: collabn1.shaiksameer
Lag Limit: 30 seconds (not in use)
Shutdown Primary: TRUE
Auto-reinstate: TRUE
Configuration Status:
SUCCESS
DGMGRL> show fast_start failover
Fast-Start Failover: ENABLED
Threshold: 30 seconds
Target: orcl
Observer: collabn1.shaiksameer
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)
Terminate the primary to initiate the Fast-Start Failover:
[oracle@collabn2 ~]$ pgrep -lf "smon.*msft"
31665 ora_smon_msft
[oracle@collabn2 ~]$ pgrep -f "smon.*msft" | kill -9
[oracle@collabn2 ~]$ pgrep -lf "smon.*msft"
In Alert_log:
Tue Aug 25 11:54:46 2015
PMON (ospid: 31629): terminating the instance due to error 474
Tue Aug 25 11:54:46 2015
System state dump is made for local instance
System State dumped to trace file /u01/app/oracle/diag/rdbms/msft/msft/trace/msft_diag_31637.trc
Trace dumping is performing id=[cdmp_20150825115446]
Termination issued to instance processes. Waiting for the processes to exit
Tue Aug 25 11:54:56 2015
Instance termination failed to kill one or more processes
Instance terminated by PMON, pid = 31629
DGMGRL>
DGMGRL> start observer
Observer started
11:55:17.29 Tuesday, August 25, 2015
Initiating Fast-Start Failover to database "orcl"...
Performing failover NOW, please wait...
Failover succeeded, new primary is "orcl"
11:55:20.65 Tuesday, August 25, 2015
11:58:37.45 Tuesday, August 25, 2015
Initiating reinstatement for database "msft"...
Reinstating database "msft", please wait...
Operation requires shutdown of instance "msft" on database "msft"
Shutting down instance "msft"...
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "msft" on database "msft"
Starting instance "msft"...
Unable to connect to database
ORA-12541: TNS:no listener
Failed.
Warning: You are no longer connected to ORACLE.
Please complete the following steps and reissue the REINSTATE command:
start up and mount instance "msft" of database "msft"
11:58:55.43 Tuesday, August 25, 2015
DGMGRL> connect sys
Password:
Connected.
DGMGRL> show configuration verbose
Configuration - DG_PROD
Protection Mode: MaxAvailability
Databases:
orcl - Primary database
Warning: ORA-16817: unsynchronized fast-start failover configuration
msft - (*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
(*) Fast-Start Failover target
Fast-Start Failover: ENABLED
Threshold: 30 seconds
Target: msft
Observer: collabn1.shaiksameer
Lag Limit: 30 seconds (not in use)
Shutdown Primary: TRUE
Auto-reinstate: TRUE
Configuration Status:
WARNING
DGMGRL> reinstate database msft
Reinstating database "msft", please wait...
Reinstatement of database "msft" succeeded
DGMGRL> show configuration verbose
Configuration - DG_PROD
Protection Mode: MaxAvailability
Databases:
orcl - Primary database
msft - (*) Physical standby database
(*) Fast-Start Failover target
Fast-Start Failover: ENABLED
Threshold: 30 seconds
Target: msft
Observer: collabn1.shaiksameer
Lag Limit: 30 seconds (not in use)
Shutdown Primary: TRUE
Auto-reinstate: TRUE
Configuration Status:
SUCCESS
After the fast start failover automatic reinstate of standby database failed and I have to issue the command “reinstate database msft” manually from Primary dgmgrl.
SQL> select db_unique_name,open_mode,database_role from v$database;
DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE
------------------------------ -------------------- ----------------
msft MOUNTED PHYSICAL STANDBY
SQL> select db_unique_name,open_mode,database_role from v$database;
DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE
------------------------------ -------------------- ----------------
orcl READ WRITE PRIMARY