Performing a Manual Failover with DG Broker
On Primary
SQL> Shut immediate
DGMGRL> failover to stdy;
Performing failover NOW, please wait...
Failover succeeded, new primary is "stdy"
DGMGRL> show configuration;
Configuration - orcl_stdy
Protection Mode: MaxPerformance
Databases:
stdy - Primary database
orcl - Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL> reinstate database orcl;
Reinstating database "orcl", please wait...
Error: ORA-16653: failed to reinstate database
Failed.
Reinstatement of database "orcl" failed
On Standby
SQL> select database_role from v$database;
DATABASE_ROLE
----------------
PRIMARY
SQL> select standby_became_primary_scn from v$database;
STANDBY_BECAME_PRIMARY_SCN
--------------------------
961964
On Old Primary
SQL> startup mount
ORACLE instance started.
Total System Global Area 1272213504 bytes
Fixed Size 1336260 bytes
Variable Size 855641148 bytes
Database Buffers 402653184 bytes
Redo Buffers 12582912 bytes
Database mounted.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
SQL> flashback database to scn 961964;
Flashback complete.
SQL> alter database convert to physical standby;
Database altered.
SQL> select status from v$instance;
STATUS
------------
STARTED
SQL> shut immediate
SQL> startup mount
SQL> alter database recover managed standby database disconnect from session using current logfile;
DGMGRL> connect sys/oracle@stdy
Connected.
DGMGRL> show configuration;
Configuration - orcl_stdy
Protection Mode: MaxPerformance
Databases:
stdy - Primary database
orcl - Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL> remove database orcl;
DGMGRL> ADD DATABASE orcl AS CONNECT IDENTIFIER IS orcl MAINTAINED AS PHYSICAL;
DGMGRL> show configuration;
Configuration - orcl_stdy
Protection Mode: MaxPerformance
Databases:
stdy - Primary database
orcl - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL>
Thanks (Commands plz)
No comments:
Post a Comment