Perform smooth switchover with Data Guard Broker.
Data Guard Broker Switchover
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.
Switchover Using DGMGRL
Consider test and test_s as primary and standby databases respectively. Connect to DGMGRL and issue below command
On primary:
===========
dgmgrl sys/sys@test
DGMGRL> show configuration;
DGMGRL> SWITCHOVER TO test_s;
Performing switchover NOW, please wait...
Operation requires a connection to instance "proddb_st" on database "test_s"
Connecting to instance "test_s"...
Connected.
New primary database "test_s" is opening...
Operation requires startup of instance "test" on database "test"
Starting instance "test"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "test_s"
DGMGRL> show configuration;
Revert Back Using DGMGRL
Once you perform switchover, the original primary becomes standby and original standby becomes primary. At this point, our primary is test_sand standby is test. Connect to current primary test_sand switchover to current stnadby test
On current primary(test_s):
==============================
dgmgrl sys/sys@test_s
DGMGRL> show configuration;
DGMGRL> switchover to test;
Performing switchover NOW, please wait...
Operation requires a connection to instance "test" on database "test"
Connecting to instance "test"...
Connected.
New primary database "test" is opening...
Operation requires startup of instance "test_s" on database "test_s"
Starting instance "test_s"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "test"
DGMGRL> show configuration;
No comments:
Post a Comment
Please do not enter any spam link in the comments