Re: Dataguard logs

Posted by ErmanArslansOracleBlog on
URL: http://erman-arslan-s-oracle-forum.114.s1.nabble.com/Dataguard-logs-tp1478p1479.html

Send me the following;

In 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#

In 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; 


2016-11-01 13:35 GMT+02:00 Roshan [via Erman Arslan's Oracle Forum] <[hidden email]>:
Hello Erman,

I am doing a healthcheck on a database where dataguard is implemented(Oracle 9i)

SQL> select sequence#
from v$archived_log
where standby_dest='NO'
minus
select sequence#
from v$archived_log
where standby_dest='YES'
minus
select min(sequence#) from v$archived_log  2    3    4    5    6    7    8    9
10  ;
 
 
SEQUENCE#
----------
    386140
    386141
    386176
    386204
    386205
    386206
    386207
    386208
    386226
    386273
    386303
 
 
SEQUENCE#
----------
    386304
    386305
    386306
    386307
    386308
    386309
    386310
    386311
    386381
    386382
    386383
 
 
SEQUENCE#
----------
    386384
    386385
    386386
    386387
    386388
    386404
    386507
    386508
    386509
    386510
    386511
 
Do I need to transfer the archived  redo with above thread number to standby database?

SELECT UNIQUE THREAD# AS THREAD, MAX(SEQUENCE#)
  2  OVER (PARTITION BY thread#) AS LAST from V$ARCHIVED_LOG;
 
 
    THREAD       LAST
---------- ----------
         1     387993

Can you please advise
Regards,
Roshan


If you reply to this email, your message will be added to the discussion below:
http://erman-arslan-s-oracle-forum.2340467.n4.nabble.com/Dataguard-logs-tp1478.html
To start a new topic under Database, email [hidden email]
To unsubscribe from Erman Arslan's Oracle Forum, click here.
NAML



--

Erman Arslan, MBA 

Applications and Database Operations Manager

Oracle Certified Expert, Certified Exadata and Linux Administrator


Author,  Practical Oracle E-Business Suite

Blog:     ermanarslan.blogspot.com

Forum:  http://ermanarslan.blogspot.com/p/forum.html


Mobile: 05301567803