码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2017-10-10 20:29:28      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:hive   seq   关于   ora   instance   nbsp   acl   transport   latest   

补上简单的确认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的同期状况的方法

标签:hive   seq   关于   ora   instance   nbsp   acl   transport   latest   

原文地址:http://www.cnblogs.com/Frank-20160505/p/7647297.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!