We understood roles of the database in the previous article and explored SwitchOver of database roles.

Manual SwitchOver in Oracle

 

In this article, we will see FailOver of the Database role.

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 :

There are mainly two types of Fail Over possible in Data Guard.
1.Manual FailOver: In manual Fail Over we need Manual Intervene of Database Administrator. In manual failover, we can perform Complete Failover and Immediate Failover.

In the complete FailOver, it attempts to minimize data loss by applying all redo log generated on Primary Database will be applied to a standby database.

This is the default method of failover.

In immediate failover, no additional data is applied on a standby database. This is fastest and we need to explicitly define this.

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]

Performing failover :

Step 1: Check Standby Database role.

Step 2: Apply the following command to finish database recovery.

Step 3: Use the following command to activate standby database to a primary.

Step 4: Check open mode and database role from a v$database.

Step 5: Shut down primary database.

Step 6: Startup database :

Step 7: Check open mode and database role from the v$database.

Stay tuned for More articles on Oracle DataGuard

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel: https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.