Showing posts with label step by step Oracle 12c Data Guard Failover. Show all posts
Showing posts with label step by step Oracle 12c Data Guard Failover. Show all posts

Sunday, 6 March 2022

step by step Oracle 12c Data Guard Failover

 Step:1 In standby database check the database role and open_mode

SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;

OPEN_MODE         PROTECTION_MODE      DATABASE_ROLE
-------------------- -------------------- ----------------
READ ONLY WITH APPLY MAXIMUM PERFORMANCE  PHYSICAL STANDBY

  Step:2 Check archive log gap sequence

 SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;

no rows selected

 Step:3 Cancel MRP process in standby database

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

Database altered. 

 Step:4 Bring up standby database as primary 

SQL> alter database recover managed standby database finish;

Database altered.

SQL> alter database activate standby database;

Database altered.

Managed recovery process has been stopped between primary and standby database and standby becomes primary database.

Step:5 Shutdown and startup database and verify database name its open mode and its role.

SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.


SQL> startup
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 1.6106E+11 bytes
Fixed Size            7653336 bytes
Variable Size         8.1604E+10 bytes
Database Buffers     7.8920E+10 bytes
Redo Buffers          529215488 bytes
Database mounted.
Database opened.
SQL> select open_mode,database_role from v$database;

OPEN_MODE         DATABASE_ROLE
-------------------- ----------------
READ WRITE         PRIMARY