Description:-
In this article we are going to see about Oracle standby database – Archivelog gap
Archivelog gap
set pagesize 320
set linesize 200
set wrap off
select thread#, sequence#, applied,to_char(first_time,’mm/dd/yy hh24:mi:ss’) first,to_char(next_time, ‘mm/dd/yy hh24:mi:ss’) next,to_char(completion_time, ‘mm/dd/yy hh24:mi:ss’) completion
from v$archived_log where thread# = 1 order by first_time;
Log Gap Check
SELECT ARCH.THREAD# “Thread”, ARCH.SEQUENCE# “Last Sequence Received”, APPL.SEQUENCE# “Last Sequence Applied”, ARCH.SEQUENCE# – APPL.SEQUENCE#) “Difference”
FROM (SELECT THREAD#, SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#, FIRST_TIME) IN ( SELECT THREAD#, MAX (FIRST_TIME)
FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH, (SELECT THREAD#, SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#, FIRST_TIME) IN ( SELECT THREAD#, MAX (FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL WHERE ARCH.THREAD# = APPL.THREAD# ORDER BY 1;
Restore archivelog from Backup
run {
restore archivelog from sequence 27 until sequence 24 thread 1;
}
Stop and Start (MRP) Apply Services
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Connect with me on:-
Telegram App:https://t.me/oracledbwr
LinkedIn:https://www.linkedin.com/in/hariprasathdba
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