除了看alert.log,简单的查询当前状态,在备库上执行以下语句:
-
col OPEN_MODE for a10
-
col PROTECTION_MODE for a20
-
col DATABASE_ROLE for a18
-
col SWITCHOVER_STATUS for a17
-
col thread# for 99
-
col name for a10
-
col diff for 9999
-
set lin 200
-
select A.THREAD#,C.NAME,C.OPEN_MODE,C.PROTECTION_MODE,C.DATABASE_ROLE,C.SWITCHOVER_STATUS,A.APPLOG,B.NOWLOG, A.APPLOG- B.NOWLOG DIFF from (SELECT THREAD#, MAX(SEQUENCE#) AS "APPLOG" FROM V$ARCHIVED_LOG WHERE APPLIED='YES' and RESETLOGS_CHANGE#=(select RESETLOGS_CHANGE# from v$database) GROUP BY THREAD#) A,(SELECT THREAD#, MAX(SEQUENCE#) AS "NOWLOG" FROM V$LOG GROUP BY THREAD#) B,v$database C where A.THREAD#=B.THREAD#;
-
-
set lin 200 pages 100
-
col PROCESS for a11
-
col PID for 99999999
-
col STATUS for a15
-
col CLIENT_PROCESS for a11
-
col CLIENT_PID for a11
-
col GROUP# for a5
-
col SEQUENCE# for 99999999
-
col BLOCK# for 99999999
-
col BLOCKS for 99999999
-
col DELAY_MINS for 99999999
-
col THREAD# for 99
-
select PROCESS,PID,STATUS,CLIENT_PROCESS,CLIENT_PID,GROUP#,THREAD#,SEQUENCE#,BLOCK#,BLOCKS,DELAY_MINS from v$managed_standby;
第一个语句看DIFF列,不要超过-3(即主库比备库大3个)。
第二个语句看process=MRP0的那一行对应的STATUS应该是APPLYING_LOG状态,且如果执行一次
BLOCK#就增加一些,说明同步正常。
阅读(1244) | 评论(0) | 转发(0) |