RE: Find the latest SCN # in phisical standby

From: Jiang, Lu <>
Date: Wed, 13 Jan 2010 12:12:06 -0500
Message-ID: <>

Thank you Laimutis, Jinwen and Kellyn for your helpful inputs. These made me feel more clear. I did not realize v$standby_log has so much detail info (thought it was just like v$logfile). Laimutis, you are right, the most important thing is that all the committed data in primary is also in standy and no data loss in case of disaster happen to primary.   

-----Original Message-----

From: [] Sent: Wednesday, January 13, 2010 7:14 AM To: Jiang, Lu
Cc: ORACLE-L; Subject: Re: Find the latest SCN # in phisical standby

You are interested into what?

v$standby_log should provide what is written into standby log

v$managed_standby provides how recovery progresses but only tells how many
redo blocks it advanced.

v$datafile and v$datafile_header provide checkpoint scn.

What is missing here is managed recovery scn.

But who really cares because what is really important is a checkpoint scn.

Please consider the environment before printing this e-mail  

             "Jiang, Lu"



             Sent by:                  "ORACLE-L"

                                       Find the latest SCN # in phisical

             2010.01.13 00:52          standby



             Please respond to





Hi all,

I have set up a real time apply physical standby and trying to find how Real Time it is. However it seems that it is hard to find the latest SCN#
on physical standby database, v$database (current_scn) only gets updated to
the last scn which has been archived. Here is what I got:

SQL> select recovery_mode from v$archive_dest_status where dest_id=2; RECOVERY_MODE

MANAGED REAL TIME APPLY SQL> select name, value, time_computed from v$dataguard_stats where name='apply lag';
NAME            VALUE                TIME_COMPUTED

--------------- -------------------- ------------------------------
apply lag +00 00:00:00 12-JAN-2010 15:26:02

Primary last change time:

SQL> select scn_to_timestamp(current_scn) from v$database; SCN_TO_TIMESTAMP(CURRENT_SCN)

12-JAN-10 PM

Standby last change time: - not updated after last log archived

SQL> select current_scn from v$database;

579664324 SQL> select scn_to_timestamp(579664324) from v$database; SCN_TO_TIMESTAMP(579664324)
--- 11-JAN-10 PM SQL> select max(FIRST_CHANGE#),max(NEXT_CHANGE#) from v$archived_log; MAX(FIRST_CHANGE#) MAX(NEXT_CHANGE#)
------------------ -----------------
579266831 579664325 Could someone share some light on this? Thanks, Lu --
Received on Wed Jan 13 2010 - 11:12:06 CST

Original text of this message