There can be situation , in dataguard setup, where archive logs are missing from primary , before it was being shipped to standby  . Till 11g , we can make standby db sync with primary by taking an incremental backup from primary and apply the same in standby  .  But with 12c , a new feature has been introduced ( RECOVER DATBASE USING SERVICE) , which simplifies this method a lot . 

          For 11g  Refer  : How to recover standby database when archive logs are missing in primary 

 

STEP 1 : CHECK PRIMARY / STANDBY DATABASE STATUS

 

 

2. CHECK ARCHIVE SEQUENCES

 

 Archive sequences from 74 are missing from primary , before being shipped to standby .
Follow the below steps to make standby in sync with primary in 12c .

NOTE – All the below steps need to be done on standby database 

STEP 3 : CANCEL RECOVERY ON STANDBY :

 

STEP 4 : START STANDBY DB IN MOUNT STATE( IF it is ACTIVE DATAGUARD)

STEP 5 : RECOVER STANDBY USING SERVICE

Connect to rman target in standby database and run the recover standby database command using the service of PRIMARY .

SYNTAX –  RECOVER DATABASE FROM SERVICE < PRIMARY DB SERVICE NAME > NOREDO USING COMPRESSED BACKUPSET;

STEP 6 : RESTORE STANDBY CONTROLFILE IN NOMOUNT STAGE:

SYNTAX –  RESTORE STANDBY CONTROLFILE  FROM SERVICE < PRIMARY DB SERVICE NAME > ;

 

STEP 7 : CHECK DATAFILES

STEP 8 : RUN RECOVER DATABASE( IN STANDBY )

STEP 9 : OPEN THE DATABASE and START  MEDIA RECOVERY:

     Now  standby database is in sync with primary . Do few log switch in primary and check whether archives are shipping to standby or not.

But if we check the alert log of stand by , we can see warning  like No standby redo . 

Archived Log entry 4 added for thread 1 sequence 93 rlc 925475123 ID 0x23c3441f dest 2:
RFS[4]: No standby redo logfiles available for thread 1
RFS[4]: Opened log for thread 1 sequence 94 dbid 599956155 branch 925475123
Tue Oct 18 19:10:59 2016

To fix it, we need to drop and recreate the standby redo logs

STEP 10 : DROP AND RECREATE STANDBY REDO LOGS( ON STANDBY) 

STEP 11 : START THE RECOVERY AGAIN:

 

MORE ARTICLES ON STANDBY:

1. Oracle dataguard Concepts:

2. How to create physical standby database

3 . Convert physical standby database to snapshot database

4.  Switchover in physical standby database 

5. Applying PSU patch in physical standby database