0% found this document useful (0 votes)
61 views8 pages

Practice Enabling Fast-Start Failover

Practice Enabling Fast-Start Failover
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views8 pages

Practice Enabling Fast-Start Failover

Practice Enabling Fast-Start Failover
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Practice 8: Enabling Fast-Start Failover | page: 1

Practice Enabling Fast-Start Failover


Title

Purpose This practice takes you through the procedure to enable and test the Fast-
Start Failover (FSFO)

Software Oracle database version 12.1.0.2 on Oracle Linux 6.7 64-bit.


version

Document 1.1, Aug-2016


version

Required VirtualBox Appliance


Software
The practice has been implemented on an Oracle virtual appliances that have
/ Files
been in practice number 3. We named that practice “Practice 3 Configure the
Broker”.

Hardware About 85 GB of free disk space to be used by the appliances of this practice.

Oracle 12c Data Guard Administration Course by Ahmed Baraka


Practice 8: Enabling Fast-Start Failover | page: 2

Data Guard Configuration

Protection Mode Maximum Performance

Fast-start Failover Enabled

The management interface Broker

Standby Database Type Physical Standby

Standby Database Unique Name ORADB_S2

Standby Database Hostname srv2

Oracle 12c Data Guard Administration Course by Ahmed Baraka


Practice 8: Enabling Fast-Start Failover | page: 3

The Practice Overview


The Practice Environment
• You will work on a copy of the appliances that you created in the practice number 3
“Configure the Broker”.

• Make sure the StaticConnectIdentifier is properly set.

Configure and Enable FSFO


• You will configure and enable the FSFO. For testing purpose, there is no need to
build a system for the observer in our case.

Test FSFO Functionality


• You will test how the observer will react when the primary database is made
unavailable.

Oracle 12c Data Guard Administration Course by Ahmed Baraka


Practice 8: Enabling Fast-Start Failover | page: 4

Configure and Enable FSFO

Get the Environment Ready

1. Copy the appliances that you created in the practice number 3. Give the folder that contains the
appliances the name “Practice 8 Fast-Start Failover”.

2. In VirtualBox, open the two appliances in the folder “Practice 8 Fast-Start Failover”.

3. Start the appliances then make sure that their databases are up and running.

4. Verify the Broker configuration is enabled.


dgmgrl sys/oracle@oradb
show configuration
show database oradb
show database oradb_s2

5. Start monitoring the alert log files and the Broker logfile:
# on srv1
tail -f /u01/app/oracle/diag/rdbms/oradb/ORADB/trace/alert_ORADB.log
tail -f /u01/app/oracle/diag/rdbms/oradb/ORADB/trace/drcORADB.log

# on srv2
tail -f /u01/app/oracle/diag/rdbms/oradb_s2/ORADB_S2/trace/alert_ORADB_S2.log

6. Make sure that the StaticConnectIdentifier properly in both databases is pointed to the right
HOST. While doing the following sub-steps, keep your eye on the monitoring session of the Broker log
file.

The property StaticConnectIdentifier is used by the Broker to connect remotely to a database. The
HOST attribute value in this property is set automatically by the Broker. It takes its value from the
LOCAL_LISTENER parameter. In our case, the LOCAL_LISTENER parameter in the standby database was
set to 127.0.0.1. We need to fix this.

6.1 Display the value of the property StaticConnectIdentifier in both databases. Make sure
the HOST attribute is correctly set in both databases. If not, proceed to next step.
show database oradb StaticConnectIdentifier
show database oradb_s2 StaticConnectIdentifier

6.2 Connect to ORADB_S2 using Sql*plus and display the LOCAL_LISTENER value.
sqlplus sys/oracle@oradb_s2 as sysdba
show parameter LOCAL_LISTENER

6.3 Fix the HOST value in the LOCAL_LISTENER parameter.


ALTER SYSTEM SET LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.125)(PORT=1521))'
;

Oracle 12c Data Guard Administration Course by Ahmed Baraka


Practice 8: Enabling Fast-Start Failover | page: 5

6.4 In the standby database, restart the listener:


su – grid
lsnrctl stop
lsnrctl start

6.5 Instruct the Broker to reset the StaticConnectIdentifier property. When you reset this
property, the Broker will assign a new value to this property and gets the HOST attribute
value from the LOCAL_LISTENER parameter.
EDIT DATABASE ORADB_S2 RESET PROPERTY StaticConnectIdentifier ;
# verify:
SHOW DATABASE VERBOSE ORADB_S2;

6.6 Stop and start the MRP process.


EDIT DATABASE oradb_s2 SET STATE = APPLY-OFF;
EDIT DATABASE oradb_s2 SET STATE = APPLY-ON;

Note: For more information about how the Broker sets the StaticConnectIdentifier property, refer to
the Doc ID 1387859.1

Oracle 12c Data Guard Administration Course by Ahmed Baraka


Practice 8: Enabling Fast-Start Failover | page: 6

Configure and Enable FSFO

Configure the FSFO

7. Display the current FSFO configuration in the Broker:


SHOW FAST_START FAILOVER

8. Define the target standby of the FSFO in the two databases:


EDIT DATABASE ORADB SET PROPERTY FastStartFailoverTarget = 'ORADB_S2';
EDIT DATABASE ORADB_S2 SET PROPERTY FastStartFailoverTarget = 'ORADB';

9. Define the Fast-Start Failover threshold:


EDIT CONFIGURATION SET PROPERTY FastStartFailoverThreshold=45;

10. Optionally, define the acceptable lag between the primary and standby database.
EDIT CONFIGURATION SET PROPERTY FastStartFailoverLagLimit = 120;

11. Verify that the FastStartFailoverPmyShutdown is set:

SHOW CONFIGURATION FastStartFailoverPmyShutdown

12. Verify that the FastStartFailoverAutoReinstate is set:

SHOW CONFIGURATION FastStartFailoverAutoReinstate

Enable the FSFO

13. Enable Fast-Start Failover


ENABLE FAST_START FAILOVER;

14. Start the Observer in the standby system (srv2). Note: never start the Observer in a database
system in production.
# on srv2:
su - oracle
dgmgrl sys/oracle@oradb_s2
START OBSERVER FILE='/home/oracle/ORADBFSFO.dat';

15. Observe the new enabled configuration. It may take a few seconds before the commands will
successfully displays the new configuration.
# on srv1
SHOW CONFIGURATION
SHOW FAST_START FAILOVER

Oracle 12c Data Guard Administration Course by Ahmed Baraka


Practice 8: Enabling Fast-Start Failover | page: 7

Test FSFO Functionality


16. Mimic a primary database failover
# on primary database appliance (srv1):
sqlplus / as sysdba
show parameter db_unique_name
shutdown abort

17. Observe the output of the Observer window and the alert log files.

18. Verify the failover was successful.


conn system/oracle@oradb
conn system/oracle@oradb_s2

19. Mount the primary database and notice the reaction of the Observer. ORADB database should be
automatically re-instated.
Note: do not OPEN the database, otherwise automatic reinstate will fail and return ORA-16653 error.
# on primary database appliance (srv1):
conn / as sysdba
startup MOUNT

20. Notice the current Data Guard configuration.


dgmgrl sys/oracle@oradb

SHOW CONFIGURATION
SHOW FAST_START FAILOVER
SHOW DATABASE ORADB_S2;
SHOW DATABASE ORADB;

21. Switchover to oradb. Verify the new roles taken by the databases.
SWITCHOVER TO ORADB
SHOW CONFIGURATION

Oracle 12c Data Guard Administration Course by Ahmed Baraka


Practice 8: Enabling Fast-Start Failover | page: 8

Notes

Shutting Down the Broker Configuration Members


• Stop the Observer. Open a new DGMGRL session and issue the STOP OBSERVER command.
su - oracle
dgmgrl sys/oracle@oradb_s2
STOP OBSERVER

• Shutdown the databases and then the appliances

Note: the appliances used in this practice will be needed later in this course. Do not delete the folder at
this stage.

Oracle 12c Data Guard Administration Course by Ahmed Baraka

You might also like