CURRENT_SCN from v$database not showing the correct value in physical standby DB

(Doc ID 811434.1)

Last updated on FEBRUARY 14, 2017

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 10.2.0.5 - Release: 10.2 to 10.2
Information in this document applies to any platform.

Symptoms

Database version: 10.2.0.x

From physical standby database, where real time apply is using, the following query do not return the correct result:


Primary:
--------
SQL> select CURRENT_SCN from v$database;

CURRENT_SCN
-----------
     644461



Standby at the same time
------------------------
SQL> select CURRENT_SCN from v$database;

CURRENT_SCN
-----------
     564695

SQL> select group#, THREAD#, SEQUENCE#, FIRST_CHANGE#, LAST_CHANGE#, BYTES,
     ARCHIVED,STATUS from V$STANDBY_LOG;

GROUP# THREAD# SEQUENCE# FIRST_CHANGE# LAST_CHANGE#      BYTES ARC STATUS
------ ------- --------- ------------- ------------ ---------- --- ----------
    11       1         0             0            0 1073741824 NO  UNASSIGNED
    12       1        81        564696       644432 1073741824 YES ACTIVE
    13       1         0             0            0 1073741824 NO  UNASSIGNED
    14       0         0             0            0 1073741824 YES UNASSIGNED


From the query result, can see that the current_scn is not from the current log, and will not change until a log switch happen.

According to Oracle documentation, the description of "CURRENT_SCN" under v$database is:

Current SCN; null if the database is not currently open. For a standby database, the current standby redo application SCN.


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms