Check the last applied and shipped archive log in Oracle Dataguard

Check the archive log status in Oracle Data guard

Check the received and applied archive log on the Oracle Dataguard environment

select 'Last Log applied : ' Logs, to_char(next_time,'DD-MON-YY:HH24:MI:SS') Time from v$archived_log where sequence# = (select max(sequence#) from v$archived_log where applied='YES')
union 
select 'Last Log received : ' Logs, to_char(next_time,'DD-MON-YY:HH24:MI:SS') 
Time from v$archived_log where sequence# = (select max(sequence#) from v$archived_log);

Find the last applied log on Standby Server:

select to_char(max(FIRST_TIME),'hh24:mi:ss dd/mm/yyyy') FROM 
V$ARCHIVED_LOG where applied='YES';

Find out the last seq received and applied in Dataguard

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 resetlogs_change#=(SELECT resetlogs_change# FROM v$database) GROUP BY thread#) lh WHERE al.thrd = lh.thrd;
This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply