Re: Dataguard logs
Posted by ErmanArslansOracleBlog on
URL: http://erman-arslan-s-oracle-forum.114.s1.nabble.com/Dataguard-logs-tp1478p8649.html
Run the following on primary ->
SELECT THREAD#, MAX(SEQUENCE#)
FROM V$LOG_HISTORY
WHERE RESETLOGS_CHANGE# =
(SELECT RESETLOGS_CHANGE#
FROM V$DATABASE_INCARNATION
WHERE STATUS = 'CURRENT')
GROUP BY THREAD#;
check the "max(Sequence#)"
Run the following on standby ->
> select al.thrd "Thread", almax "Last Seq Received", lhmax "Last Seq Applied"
from (select thread# thrd, max(sequence#) almax
from v$archived_log
where resetlogs_change#=(select resetlogs_change# from v$database)
group by thread#) al,
(select thread# thrd, max(sequence#) lhmax
from v$log_history
where first_time=(select max(first_time) from v$log_history)
group by thread#) lh
where al.thrd = lh.thrd
Check "Last Seq Applied"
If "max(Sequence#)" returned from primary and "Last Seq Applied" returned from standby is the same. Then you are ok. You are sync.