• Arun Kumar

Data Guard Broker Switchover

In my previous article, we discussed about Oracle Data Guard Broker Configuration.


Let’s look at how to perform data guard switchover using broker configuration. It’s very simple to perform switchover using data guard broke as its only one single commands that does the work.


A database can be in one of two mutually exclusive modes (primary or standby). These roles can be altered at run-time without loss of data or resetting of redo logs. This process is known as a Switchover and can be performed using the following commands.


Perform Switchover


Consider proddb and proddb_st as primary and standby databases respectively. Connect to DGMGRL and issue below command

On primary:
===========
dgmgrl sys/sys@proddb

DGMGRL> show configuration;

DGMGRL> SWITCHOVER TO proddb_st;
Performing switchover NOW, please wait...
Operation requires a connection to instance "proddb_st" on database "proddb_st"
Connecting to instance "proddb_st"...
Connected.
New primary database "proddb_st" is opening...
Operation requires startup of instance "proddb" on database "proddb"
Starting instance "proddb"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "proddb_st"

DGMGRL> show configuration;


Revert Back


Once you perform switchover, the original primary becomes standby and original standby becomes primary. At this point, our primary is proddb_st and standby is proddb.


Connect to current primary proddb_st and switchover to current stnadby proddb

On current primary(proddb_st):
==============================
dgmgrl sys/sys@proddb_st

DGMGRL> show configuration;

DGMGRL> switchover to proddb;
Performing switchover NOW, please wait...
Operation requires a connection to instance "proddb" on database "proddb"
Connecting to instance "proddb"...
Connected.
New primary database "proddb" is opening...
Operation requires startup of instance "proddb_st" on database "proddb_st"
Starting instance "proddb_st"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "proddb"

DGMGRL> show configuration;


Recent Posts

See All

Oracle Data Guard Protection Modes

A Data Guard configuration always runs in one of three data protection modes (also called as redo transport rules): Maximum Protection Maximum Availability Maximum Performance (default mode of operati

Oracle Data Guard Physical Standby Configuration

There are various steps in which you can configure physical standby database. We need to make several changes to the primary database before we can even setup the standby database. This article applie

Client Connectivity in Data Guard Configuration

When you have a physical standby, you must make sure client connectivity is set properly so that when you perform failover or switchover, client must smoothly connect to the new primary. Create a data

  • Facebook
  • Twitter
  • YouTube
  • Instagram

© 2020 by DBA Genesis