top of page
  • Writer's pictureArun 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;

2,830 views

Recent Posts

See All
bottom of page