[Oracle][DATAGUARD] 关于确认PHYSICAL STANDBY的同期状况的方法

Posted Frank_20160505

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Oracle][DATAGUARD] 关于确认PHYSICAL STANDBY的同期状况的方法相关的知识,希望对你有一定的参考价值。

补上简单的确认PHYSICAL STANDBY的同期状况的方法:

ODM TEST CASE
===================
Name = TC#1010_3

####Primary####

SQL> set line 200
col name for a100SQL>
SQL> select instance_name,status from v$instance;

INSTANCE_NAME                                    STATUS
------------------------------------------------ ------------------------------------
orcl                                             OPEN

SQL> select database_role from v$database;

DATABASE_ROLE
------------------------------------------------
PRIMARY ★Primary

SQL> select sequence#-1 from v$log where status=‘CURRENT‘;

SEQUENCE#-1
-----------
       61 ★on Primary, Latest ONLINE Redo number is 61


####Standby####


SQL> set line 200
col name for a100SQL>
SQL> select instance_name,status from v$instance;

INSTANCE_NAME                                    STATUS
------------------------------------------------ ------------------------------------
orcls                                            OPEN

SQL> select database_role from v$database;

DATABASE_ROLE
------------------------------------------------
PHYSICAL STANDBY ★PHYSICAL STANDBY

SQL> select sequence#, name, applied from v$archived_log where resetlogs_change# = (select resetlogs_change# from v$database) order by sequence#;

SEQUENCE# NAME                                                                                                 APPLIED
---------- ---------------------------------------------------------------------------------------------------- ---------------------------
      54                                                                                                      YES
      55 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_01_09/o1_mf_1_55_d768d472_.arc              YES
      56 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_01_09/o1_mf_1_56_d768dvdr_.arc              IN-MEMORY ★
      57 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_08_17/o1_mf_1_57_dsb0ljby_.arc              NO
      58 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_08_17/o1_mf_1_58_dsb0lgkq_.arc              NO
      59 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_08_17/o1_mf_1_59_dsb0lgk1_.arc              NO
      60 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_08_17/o1_mf_1_60_dsb0ljc1_.arc              NO
      61 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_08_17/o1_mf_1_61_dsb0mg3z_.arc              NO ★on Standby,no Redo transportation rag , but there is REDO application rag.

8行が選択されました。

SQL> recover managed standby database using current logfile disconnect; ★start REDO application
メディア?リカバリが完了しました。
SQL> select PROCESS,PID,STATUS,THREAD#,SEQUENCE# from V$MANAGED_STANDBY where PROCESS=‘MRP0‘; ★MRP process is on (if there is no record here , it means MRP is not on )

PROCESS                            PID STATUS                                  THREAD#  SEQUENCE#
--------------------------- ---------- ------------------------------------ ---------- ----------
MRP0                              2898 APPLYING_LOG                                  1         62

SQL> select sequence#, name, applied from v$archived_log where resetlogs_change# = (select resetlogs_change# from v$database) order by sequence#;

SEQUENCE# NAME                                                                                                 APPLIED
---------- ---------------------------------------------------------------------------------------------------- ---------------------------
      54                                                                                                      YES
      55 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_01_09/o1_mf_1_55_d768d472_.arc              YES
      56 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_01_09/o1_mf_1_56_d768dvdr_.arc              YES
      57 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_08_17/o1_mf_1_57_dsb0ljby_.arc              YES
      58 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_08_17/o1_mf_1_58_dsb0lgkq_.arc              YES
      59 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_08_17/o1_mf_1_59_dsb0lgk1_.arc              YES
      60 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_08_17/o1_mf_1_60_dsb0ljc1_.arc              YES
      61 /u01/app/oracle/fast_recovery_area/ORCLS/archivelog/2017_08_17/o1_mf_1_61_dsb0mg3z_.arc              IN-MEMORY ★If there is no REDO application rag and Redo transportation rag on Standby, the "APPLIED" column of Latest SEQUENCE should be "IN-MEMORY"(expected behavior)

8行が選択されました。



















































































以上是关于[Oracle][DATAGUARD] 关于确认PHYSICAL STANDBY的同期状况的方法的主要内容,如果未能解决你的问题,请参考以下文章

[Oracle][DATAGUARD]关于REDO_TRANSPORT_USER参数

Oracle 11.2.0.4.0 Dataguard部署和日常维护 - Dataguard Flashback

oracle11g dataguard 完全手册

oracle11g dataguard 完全手册

oracle11g dataguard 完全手册

Oracle数据库容灾解决方案:Oracle DataGuard部署实录