<<Back to Oracle DataGuard Main Page
HOW TO ACTIVATE PHYSICAL STANDBY DATABASE WHEN PRIMARY IS NO MORE AVAILABLE
If you have lot the primary database and you want to activate the physical standby database as primary you can follow the steps below.
SQL> RECOVER MANAGED STANDBY DATABASE CANCEL;
Media recovery complete.
SQL> SHUT IMMEDIATE
SQL> STARTUP MOUNT
SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;
OPEN_MODE PROTECTION_MODE DATABASE_ROLE
-------------------- -------------------- ----------------
MOUNTED MAXIMUM PERFORMANCE PHYSICAL STANDBY
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
Database altered.
SQL> ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE;
Database altered.
SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;
OPEN_MODE PROTECTION_MODE DATABASE_ROLE
-------------------- -------------------- ----------------
MOUNTED MAXIMUM PERFORMANCE PRIMARY
SQL> SHUT IMMEDIATE
SQL> STARTUP
SQL> SELECT OPEN_MODE,PROTECTION_MODE,DATABASE_ROLE FROM V$DATABASE;
OPEN_MODE PROTECTION_MODE DATABASE_ROLE
-------------------- -------------------- ----------------
READ WRITE MAXIMUM PERFORMANCE PRIMARY
Some Important Information from Alertlog
============================================================
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH
Attempt to do a Terminal Recovery (ORCL1P)
Media Recovery Start: Managed Standby Recovery (ORCL1P)
started logmerger process
Fri Feb 28 11:47:09 2020
Managed Standby Recovery not using Real Time Apply
Parallel Media Recovery started with 8 slaves
Media Recovery Waiting for thread 1 sequence 96307
RECOVER FINISH applied through switchover EOR logs and stopped.
Media Recovery Complete: End-Of-REDO (ORCL1P)
Attempt to set limbo arscn 1296:678634682 irscn 1296:678634682
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH
ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE
ALTER DATABASE ACTIVATE [PHYSICAL] STANDBY DATABASE (ORCL1P)
Begin: Standby Redo Logfile archival
End: Standby Redo Logfile archival
RESETLOGS after complete recovery through change 5566956250298
Online log /ora_data/ORCL1P/redo/redoG5M1.rdo: Thread 1 Group 5 was previously cleared
...................
......................
Standby became primary SCN: 5566956250296
Fri Feb 28 11:47:19 2020
Setting recovery target incarnation to 5
ACTIVATE STANDBY: Complete - Database mounted as primary
Completed: ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE
Fri Feb 28 11:47:35 2020
Comments
Post a Comment