Standby sync check - Manual syncing
SreerajOct 2 2012 — edited Oct 6 2012Hello,
I would like to re-confirm what DB views do we need to really check and make sure whether my primary & standby are in sync in a manual standby mode.
Should it be v$log and v$log_history or v$archived_log.
My doubt arises with one of my client current setup.Logs are manually shipped,and later manually recovered i.e not manged recovered process.
Today i did a manual healthcheck and i see there is no rows populated in v$archived_log with APPLIED='YES' on standby.But v$log_history showed me the current log sequence which is the same in primary too.From standby alert log i confirmed the sequence number is same as the value shown in v$log_history.
Oracle manual says,v$archived_log & v$log_history gets the related info from controlfile.
So why didnt v$archived_log didnt populate the same data as v$log_history.Sometimes i see a value far less in v$archvied_log when compared to v$log_history.
Below is my script which does manual recovery .
The archives are just scp'ed and done a manual recover using sql's.
This is the script part.
#---------------------------------------
recover_auto ()
#---------------------------------------
{
echo "\n`date`... Recovering database $ORACLE_SID." >>$LOGFILE
sqlplus -s "/ as sysdba" <<EOF >$TMPFILE
recover standby database ;
auto
exit
EOF
Here is my output.
@primary:
SQL> select THREAD#,max(SEQUENCE#) ,ARCHIVED,APPLIED from V$ARCHIVED_LOG group by THREAD#,ARCHIVED,APPLIED
2 /
THREAD# MAX(SEQUENCE#) ARC APP
---------- -------------- --- ---
1 75883 YES NO
@standby
SQL> select count(*) from V$ARCHIVED_LOG
2 /
COUNT(*)
----------
0
SQL> select max(SEQUENCE#) from v$log_history
2 /
MAX(SEQUENCE#)
--------------
75883
Does the view v$archived_log & v$log_hisotry behave differently after an restart of the DR(manaul shipping & applying methods) ?
Regards
Sreeraj