除了看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#就增加一些,说明同步正常。
阅读(1088) | 评论(0) | 转发(0) |