Friday, October 9, 2020

Oracle 12c-Manual Data Guard Failover Step by Step

 When we have planned maintenance activity we can simply switch roles of Primary and Standby database. But what if Primary Database crashes and we can’t recover it in a time.

Data Guard has a solution for that. We can Fail Over Primary database role to Standby Database and we don’t need to switch Standby Database role to Primary Database.

Types of FailOver:

1.Manual FailOver:

If the Primary database fails, one of the standby databases can be made to assume the Primary role. This role change of standby database to primary, in case of failure of existing primary, is called failover. There may or may not be data loss. This is not a planned activity and is performed only in catastrophic cases where the Primary database fails.

2. Fast-start FailOver: 

We need to configure this in data guard broker. So when Primary Database is unavailable. Dgbroker will fail over primary database role to One of standby database configured previously in dgbroker.

Failover Considerations: Things we need to take care while using this option.

In this option old primary database will be disabled from the Data Guard configuration.

If primary database crashed and generated archived not copied to standby database then data loss is possible.

This option is critical and should only be used in EMERGENCY.

Note: To use this option we should use Standby Database is most current[Maximum synchronized]

 STEP 1:

 Check Standby Database role

 SQL>select name,open_mode,database_role from v$database.

 STEP 2:

 Stop the MRP Process if it is running.

 Sql>alter database recover managed standby database cancel;

 STEP 3:

 Apply the following command to finish database recovery

 Sql>alter database recover managed standby database finish;

 Step 4:

 Use the following command to activate standby database to a primary.

 Sql>alter database activate Standby database;

 Step 5:

 Check open mode and database role from a v$database

 SQL>select name,open_mode,database_role from v$database.

 Step 6:

 Shut down primary database.

 Step 7:

 Startup database

 Step 8:

 Check open mode and database role from the v$database.

 SQL>select name,open_mode,database_role from v$database.


PRACTICE :













                                                                    

No comments:

Post a Comment

ASM

Rename Asm DiskGroup Name On Oracle 12c

  Step1:Startup asm with created asm pfile. startup pfile=$ORACLE_HOME/dbs/init+ASM.ora; Step2:Dismount all disks.  alter diskgroup all dism...