Oracle dg 状态校验

查看主库状态:
select open_mode,protection_mode,database_role,switchover_status from v$database;


OPEN_MODE            PROTECTION_MODE             DATABASE_ROLE         SWITCHOVER_STATUS
-------------------- ----------------------------- ------------------------ ------------------------
READ WRITE           MAXIMUM PERFORMANCE      PRIMARY                      TO STANDBY

查看备库状态:
select open_mode,protection_mode,database_role,switchover_status from v$database;

OPEN_MODE                   PROTECTION_MODE             DATABASE_ROLE         SWITCHOVER_STATUS
------------------------- ----------------------------- ------------------------ ------------------------
READ ONLY WITH APPLY MAXIMUM PERFORMANCE      PHYSICAL STANDBY      NOT ALLOWED

检查主备两边的序号
select max(sequence#) from v$log;

备库执行,查看是否有数据未应用
select name,SEQUENCE#,APPLIED from v$archived_log order by sequence#;

select SEQUENCE#,FIRST_TIME,NEXT_TIME ,APPLIED from v$archived_log order by 1;

 

Oracle dg 状态校验

上一篇:LeetCode 977 有序数组平方的排序


下一篇:mysql三表查询