In case of worst situation with data guard primary database, or not available for production than we can activated standby database as a primary production database.
Data guard Configuration details:-
Login in to Standby Server:-
Step:1 Check the database role and open_mode
Select name,open_mode,database_role from v$database;
SQL> select database_role from v$database; DATABASE_ROLE ---------------- PHYSICAL STANDBY
Step:2 Cancel the MRP process
[oracle@standby dbs]$ ps -ef | grep mrp oracle 79976 1 0 03:19 ? 00:00:02 ora_mrp0_dbwr oracle 81638 81585 0 03:43 pts/2 00:00:00 grep --color=auto mrp [oracle@standby dbs]$ !sq sqlplus / as sysdba SQL*Plus: Release 22.214.171.124.0 - Production on Sat Mar 16 03:43:18 2019 Version 126.96.36.199.0 Copyright (c) 1982, 2018, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 188.8.131.52.0 - Production Version 184.108.40.206.0 SQL> recover managed standby database cancel; Media recovery complete.
The below commands will help to bring up standby as primary
alter database recover managed standby database finish;
SQL> recover managed standby database cancel; Media recovery complete. SQL> alter database recover managed standby database finish; Database altered. SQL> select name,open_mode,database_role from v$database; NAME OPEN_MODE DATABASE_ROLE --------- -------------------- ---------------- DBWR MOUNTED PHYSICAL STANDBY SQL> alter database activate standby database; Database altered.
Managed recovery process has been stopped between primary and standby database and standby becomes primary database.
Bounce your database and verify database name its open mode and its role.
select name,open_mode,database_role from v$database;
SQL> select database_role from v$database; DATABASE_ROLE ---------------- PRIMARY
Now your old standby database is become primary database
It is highly recommended to consider immediate full backup of primary database.
The original primary database can now be configured as a standby.
If Flashback Database was enabled on the primary database.If not, the whole setup process must be followed, but this time using the original primary server as the standby.
After failover activity,
Catch Me On:- Hariprasath Rajaram LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/ Facebook:https://www.facebook.com/HariPrasathdba FB Group:https://www.facebook.com/groups/894402327369506/ FB Page: https://www.facebook.com/dbahariprasath/? Twitter: https://twitter.com/hariprasathdba