Re: Applying logs to standby in 11g

  • From: Saibabu Devabhaktuni <saibabu_d@xxxxxxxxx>
  • To: free <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 24 Oct 2012 11:21:38 -0700 (PDT)

Yong Huang just sent me a note that the below query doesn't work on the 
dataguard when it is in the mount mode, he is right below query works only on 
Active dataguard and when the standby is in read only mode.
select
abs(nvl(max(ceil(
(extract(day from replication_lag)*24*60*60)+
(extract(hour from replication_lag)*60*60)+
(extract(minute from replication_lag)*60)+
(extract(second from replication_lag))
)),0)) lag_in_seconds from
(select sysdate-scn_to_timestamp(current_scn) replication_lag from v$database);

You can use below query to get the lag when standby is in mount mode in 
addition to relying on v$dataguard_stats:

select max(lag_time) lag_time from
(select max(timestamp) lag_time from v$recovery_progress where type='Media 
Recovery' and item='Last Applied Redo'
union all
select max(checkpoint_time) lag_time from v$datafile where file#=1);


Parameter standby_max_data_delay and current_scn in v$database rely on the 
recovery progress maintained in v$recovery_progress.

Thanks,
Sai
http://sai-oracle.blogspot.com

--
//www.freelists.org/webpage/oracle-l


Other related posts: