SQL> select sequence#, applied, to_char(first_time,’dd-mm-yyyy hh24:mi:ss’) first_time
from v$archived_log
order by sequence#;
from v$archived_log
order by sequence#;
SQL> select process,sequence#,status from v$managed_standby;
PROCESS STATUS SEQUENCE# FIRST_TIME
------------ ---------- -------------------
ARCH CONNECTED 0
ARCH CONNECTED 0
MRP0 WAIT_FOR_GAP 7279
RFS WRITING 7299
PROCESS STATUS SEQUENCE# FIRST_TIME
------------ ---------- -------------------
ARCH CONNECTED 0
ARCH CONNECTED 0
MRP0 WAIT_FOR_GAP 7279
RFS WRITING 7299
WAIT_FOR_GAP means thare are missing archivelogs. You need to recover them.
We first identify whose are missing:
[oracle@ora-test ~]$ sqlplus / as sysdba
SQL> select * from v$archive_gap;
THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
1 7279 7286
SQL> select * from v$archive_gap;
THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
1 7279 7286
We then use RMAN to recover them:
[oracle@ora-stb ~]$ rman target / catalog rman/password@rman_repo
RMAN> restore archivelog sequence between 7279 and 7286;
RMAN> restore archivelog sequence between 7279 and 7286;
You can now check
[oracle@ora-stb ~]$ ls –l /archivelog_folder/arch_72[7-8]*