Find out if archivelog was successfully sent and applied

Primary, Physical (redo apply) and Logical (SQL apply) Standby Databases or Active Data Guard
Post Reply
User avatar
jimb
Site Admin
Posts: 6146
Joined: Thu Jan 19, 2012 1:10 pm
Location: New Delhi, India
Contact:

Find out if archivelog was successfully sent and applied

Post by jimb »

On Primary
-----------------------------------------
SQL> alter system switch logfile;

SQL> select dest_id, status, error
from v$archive_dest
where dest_id in (1,2);


DEST_ID STATUS ERROR
---------- --------- -----------------------------------------------------------------
1 VALID
2 VALID

SQL> select max(sequence#) from v$archived_log
where archived = 'YES'
and RESETLOGS_TIME = (select max(RESETLOGS_TIME) from v$archived_log);


MAX(SEQUENCE#)
--------------
7

On Standby
------------------------------------------

SQL> select a.thread#, a.sequence#, a.applied
from v$archived_log a, v$database d
where a.activation# = d.activation#
and a.applied='YES'
/


select max(sequence#) from v$archived_log
where applied = 'YES'
and RESETLOGS_TIME = (select max(RESETLOGS_TIME) from v$archived_log);

MAX(SEQUENCE#)
--------------
7
Oracle Database Administration Forums
http://www.oracle-forums.com/
xaeresis
Posts: 196117
Joined: Wed Oct 04, 2023 2:39 pm

Re: Find out if archivelog was successfully sent and applied

Post by xaeresis »

xaeresis
Posts: 196117
Joined: Wed Oct 04, 2023 2:39 pm

Re: Find out if archivelog was successfully sent and applied

Post by xaeresis »

Post Reply