Switchover and switch back

 

Documentation is here and here

[oracle@primary ~]$ dgmgrl sys/xxxx@prd
DGMGRL for Linux: Version 11.2.0.3.0 – Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type “help” for information.
Connected.
DGMGRL> show configuration

Configuration – MYPRRD

Protection Mode: MaxAvailability
Databases:
PRD – Primary database
STB – Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL> switchover to ‘STB’;
Performing switchover NOW, please wait…
New primary database “STB” is opening…
Operation requires shutdown of instance “PRD” on database “PRD”
Shutting down instance “PRD”…
ORACLE instance shut down.
Operation requires startup of instance “PRD” on database “PRD”
Starting instance “PRD”…
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is “STB”
DGMGRL>

DGMGRL> show configuration;

Configuration – MYPRRD

Protection Mode: MaxAvailability
Databases:
STB – Primary database
PRD – Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL> switchover to ‘PRD’;
Performing switchover NOW, please wait…
New primary database “PRD” is opening…
Operation requires shutdown of instance “STB” on database “STB”
Shutting down instance “STB”…
ORACLE instance shut down.
Operation requires startup of instance “STB” on database “STB”
Starting instance “STB”…
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is “PRD”
DGMGRL> show configuration

Configuration – MYPRRD

Protection Mode: MaxAvailability
Databases:
PRD – Primary database
STB – Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL>

This could be helpful

SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database recover managed standby database cancel;
SQL> alter database recover managed standby database finish;
SQL> ALTER database commit to switchover to primary with session shutdown;
SQL> alter database open;
SQL> select database_role from v$database;

The following two tabs change content below.

Jacques

I am Oracle Certified Master 11g & 12c database architect with significant experience in heterogeneous environments, and strong ability to lead complex and critical projects requiring multiple technical implementations. at Trivadis SA

2 thoughts on “Switchover and switch back

Leave a Reply

Your email address will not be published. Required fields are marked *