Fast Start Failover

DGMGRL> show configuration verbose;

Configuration – my_dg_config

Protection Mode: MaxPerformance
Members:
cdb1 – Primary database
cdb1_stby – Physical standby database
Warning: ORA-16809: multiple warnings detected for the member

Properties:
FastStartFailoverThreshold = ’30’
OperationTimeout = ’30’
TraceLevel = ‘USER’
FastStartFailoverLagLimit = ’30’
CommunicationTimeout = ‘180’
ObserverReconnect = ‘0’
FastStartFailoverAutoReinstate = ‘TRUE’
FastStartFailoverPmyShutdown = ‘TRUE’
BystandersFollowRoleChange = ‘ALL’
ObserverOverride = ‘FALSE’
ExternalDestination1 = ”
ExternalDestination2 = ”
PrimaryLostWriteAction = ‘CONTINUE’
ConfigurationWideServiceName = ‘cdb1_CFG’

Fast-Start Failover: Disabled

Configuration Status:
WARNING

DGMGRL>

DGMGRL> EDIT DATABASE cdb1 SET PROPERTY ‘LogXptMode’=’SYNC’;
Property “LogXptMode” updated
DGMGRL> EDIT DATABASE cdb1_stby SET PROPERTY ‘LogXptMode’=’SYNC’;
Property “LogXptMode” updated
DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;
Succeeded.

DGMGRL> show configuration verbose;

Configuration – my_dg_config

Protection Mode: MaxAvailability
Members:
cdb1 – Primary database
Warning: ORA-16629: database reports a different protection level from the protection mode

cdb1_stby - Physical standby database

Properties:
FastStartFailoverThreshold = ’30’
OperationTimeout = ’30’
TraceLevel = ‘USER’
FastStartFailoverLagLimit = ‘0’
CommunicationTimeout = ‘180’
ObserverReconnect = ‘0’
FastStartFailoverAutoReinstate = ‘TRUE’
FastStartFailoverPmyShutdown = ‘TRUE’
BystandersFollowRoleChange = ‘ALL’
ObserverOverride = ‘FALSE’
ExternalDestination1 = ”
ExternalDestination2 = ”
PrimaryLostWriteAction = ‘CONTINUE’
ConfigurationWideServiceName = ‘cdb1_CFG’

Fast-Start Failover: Disabled

Configuration Status:
WARNING

DGMGRL>

DGMGRL> enable fast_start failover;

DGMGRL> start observer;

The session will seem to hang. You can do a control C. Or create and run the script as nohup. (other way to start the observer)

Other way to start in background

nohup dgmgrl sys/[email protected] “start observer file=’/home/oracle/fsfo.dat'” -logfile $HOME/observer.log &

DGMGRL> show fast_start failover

DGMGRL> SHOW CONFIGURATION;

#

DGMGRL> enable fast_start failover;
Enabled in Zero Data Loss Mode.
DGMGRL>

DGMGRL> show fast_start failover

Fast-Start Failover: Enabled in Zero Data Loss Mode

Protection Mode: MaxAvailability
Lag Limit: 0 seconds

Threshold: 30 seconds
Active Target: cdb1_stby
Potential Targets: “cdb1_stby”
cdb1_stby valid
Observer: ol7-19-dg1.localdomain
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 Write Errors YES

Oracle Error Conditions:
(none)

DGMGRL> SHOW CONFIGURATION;

Configuration – my_dg_config

Protection Mode: MaxAvailability
Members:
cdb1 – Primary database
cdb1_stby – (*) Physical standby database

Fast-Start Failover: Enabled in Zero Data Loss Mode

Configuration Status:
SUCCESS (status updated 31 seconds ago)

DGMGRL>

#

===> Client

C:\WINDOWS\system32>sqlplus sys/[email protected]_ha as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Sat Sep 5 01:24:02 2020

Copyright (c) 1982, 2016, Oracle. All rights reserved.

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

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

NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE


CDB1 cdb1 READ WRITE PRIMARY

#

===> Primary

SQL> shut abort;
ORACLE instance shut down.
SQL>

#

===> Client

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

NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE


CDB1 cdb1_stby READ WRITE PRIMARY

#

===> Primary

SQL> startup mount;
ORACLE instance started.

Total System Global Area 1610609888 bytes
Fixed Size 9135328 bytes
Variable Size 469762048 bytes
Database Buffers 1124073472 bytes
Redo Buffers 7639040 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.3.0.0.0
[[email protected] ~]$ dgmgrl sys/[email protected]
DGMGRL for Linux: Release 19.0.0.0.0 – Production on Fri Sep 4 17:39:04 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.

Welcome to DGMGRL, type “help” for information.
Connected to “cdb1”
Connected as SYSDBA.
DGMGRL> show configuration verbose;

Configuration – my_dg_config

Protection Mode: MaxAvailability
Members:
cdb1_stby – (*) Primary database
cdb1 – Physical standby database

(*) Fast-Start Failover target

Properties:
FastStartFailoverThreshold = ’30’
OperationTimeout = ’30’
TraceLevel = ‘USER’
FastStartFailoverLagLimit = ‘0’
CommunicationTimeout = ‘180’
ObserverReconnect = ‘0’
FastStartFailoverAutoReinstate = ‘TRUE’
FastStartFailoverPmyShutdown = ‘TRUE’
BystandersFollowRoleChange = ‘ALL’
ObserverOverride = ‘FALSE’
ExternalDestination1 = ”
ExternalDestination2 = ”
PrimaryLostWriteAction = ‘CONTINUE’
ConfigurationWideServiceName = ‘cdb1_CFG’

Fast-Start Failover: Enabled in Zero Data Loss Mode
Lag Limit: 0 seconds
Threshold: 30 seconds
Active Target: cdb1_stby
Potential Targets: “cdb1”
cdb1 valid
Observer: ol7-19-dg1.localdomain
Shutdown Primary: TRUE
Auto-reinstate: TRUE
Observer Reconnect: (none)
Observer Override: FALSE

Configuration Status:
ORA-16610: command “REINSTATE DATABASE cdb1” in progress
DGM-17017: unable to determine configuration status

DGMGRL> show configuration verbose;

Configuration – my_dg_config

Protection Mode: MaxAvailability
Members:
cdb1_stby – Primary database
cdb1 – (*) Physical standby database

(*) Fast-Start Failover target

Properties:
FastStartFailoverThreshold = ’30’
OperationTimeout = ’30’
TraceLevel = ‘USER’
FastStartFailoverLagLimit = ‘0’
CommunicationTimeout = ‘180’
ObserverReconnect = ‘0’
FastStartFailoverAutoReinstate = ‘TRUE’
FastStartFailoverPmyShutdown = ‘TRUE’
BystandersFollowRoleChange = ‘ALL’
ObserverOverride = ‘FALSE’
ExternalDestination1 = ”
ExternalDestination2 = ”
PrimaryLostWriteAction = ‘CONTINUE’
ConfigurationWideServiceName = ‘cdb1_CFG’

Fast-Start Failover: Enabled in Zero Data Loss Mode
Lag Limit: 0 seconds
Threshold: 30 seconds
Active Target: cdb1
Potential Targets: “cdb1”
cdb1 valid
Observer: ol7-19-dg1.localdomain
Shutdown Primary: TRUE
Auto-reinstate: TRUE
Observer Reconnect: (none)
Observer Override: FALSE

Configuration Status:
SUCCESS

DGMGRL>

—————————–

[[email protected] ~]$ dgmgrl sys/[email protected]_stby
DGMGRL for Linux: Release 19.0.0.0.0 – Production on Fri Sep 4 17:51:30 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.

Welcome to DGMGRL, type “help” for information.
Connected to “CDB1_STBY”
Connected as SYSDBA.
DGMGRL>
DGMGRL> switchover to cdb1;
Performing switchover NOW, please wait…
Operation requires a connection to database “cdb1”
Connecting …
Connected to “cdb1”
Connected as SYSDBA.
New primary database “cdb1” is opening…
Operation requires start up of instance “cdb1” on database “cdb1_stby”
Starting instance “cdb1″…
Connected to an idle instance.
ORACLE instance started.
Connected to “cdb1_stby”
Database mounted.
Database opened.
Connected to “cdb1_stby”
Switchover succeeded, new primary is “cdb1”
DGMGRL> show configuration;

Configuration – my_dg_config

Protection Mode: MaxAvailability
Members:
cdb1 – Primary database
cdb1_stby – (*) Physical standby database

Fast-Start Failover: Enabled in Zero Data Loss Mode

Configuration Status:
SUCCESS (status updated 11 seconds ago)

DGMGRL>

#

===> Client

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

NAME      DB_UNIQUE_NAME                 OPEN_MODE            DATABASE_ROLE
--------- ------------------------------ -------------------- ----------------
CDB1      cdb1_stby                      READ WRITE           PRIMARY

SQL> /

NAME      DB_UNIQUE_NAME                 OPEN_MODE            DATABASE_ROLE
--------- ------------------------------ -------------------- ----------------
CDB1      cdb1_stby                      CLOSED BY SWITCHOVER PHYSICAL STANDBY

SQL> /

NAME      DB_UNIQUE_NAME                 OPEN_MODE            DATABASE_ROLE
--------- ------------------------------ -------------------- ----------------
CDB1      cdb1                           READ WRITE           PRIMARY
#

DGMGRL> DISABLE FAST_START FAILOVER;

DGMGRL> show configuration;

DGMGRL> SHOW FAST_START FAILOVER

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

DGMGRL> stop observer;
Observer stopped.
DGMGRL> DISABLE FAST_START FAILOVER;
Disabled.
DGMGRL> show configuration;

Configuration – my_dg_config

Protection Mode: MaxAvailability
Members:
cdb1 – Primary database
cdb1_stby – Physical standby database

Fast-Start Failover: Disabled

Configuration Status:
SUCCESS (status updated 61 seconds ago)

DGMGRL>
DGMGRL> show fast_start failover;

Fast-Start Failover: Disabled

Protection Mode: MaxAvailability
Lag Limit: 0 seconds

Threshold: 30 seconds
Active Target: (none)
Potential Targets: “cdb1_stby”
cdb1_stby valid
Observer: (none)
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 Write Errors YES

Oracle Error Conditions:
(none)

DGMGRL>


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

NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE


CDB1 cdb1_stby READ ONLY WITH APPLY PHYSICAL STANDBY

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE cancel;

Database altered.

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

NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE


CDB1 cdb1_stby READ ONLY PHYSICAL STANDBY

SQL>

Leave a Reply

Your email address will not be published.