-- 确认租户角色以及可恢复位点 SELECT * FROM __all_virtual_tenant_info WHERE tenant_id = 1004; tenant_id gmt_create gmt_modified tenant_role switchover_status switchover_epoch sync_scn replayable_scn readable_scn recovery_until_scn log_mode max_ls_id --------- -------------------------- -------------------------- ----------- ----------------- ---------------- ------------------- ------------------- ------------------- ------------------- ------------ ----------- 1004 2024-10-18 22:39:03.789103 2024-10-18 23:00:12.134166 STANDBY NORMAL 0 1729262466216039669 1729262466216039669 1729262466216039669 4611686018427387903 NOARCHIVELOG 1001 -- 查看日志流恢复状态表 SELECT * FROM v$ob_ls_log_restore_status WHERE tenant_id = 1004; TENANT_ID LS_ID SYNC_LSN SYNC_SCN SYNC_STATUS ERR_CODE COMMENT --------- ------ ------------- ------------------- ----------- -------- --------- 1004 1 80958670724 1729263495362539967 NORMAL 0 1004 1001 7367700897792 1729262466216039669 NORMAL 0 -- 查看日志恢复源 SELECT * FROM cdb_ob_log_restore_source WHERE tenant_id = 1004; TENANT_ID ID TYPE VALUE RECOVERY_UNTIL_SCN --------- ------ ------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------- 1004 1 SERVICE IP_LIST=192.168.111.11:2881;192.168.111.12:2881;192.168.111.15:2881,USER=STANDBYRO_0@cx,PASSWORD=&aaaaaa,,TENANT_ID=1002,CLUSTER_ID=3,COMPATIBILITY_MODE=MYSQL,IS_ENCRYPTED=false 4611686018427387903 -- 查找最慢日志流 SELECT *, scn_to_timestamp(end_scn) FROM gv$ob_log_stat WHERE tenant_id = 1004 AND role = 'leader' ORDER BY end_scn; TENANT_ID LS_ID SVR_IP SVR_PORT ROLE PROPOSAL_ID CONFIG_VERSION ACCESS_MODE PAXOS_MEMBER_LIST PAXOS_REPLICA_NUM IN_SYNC BASE_LSN BEGIN_LSN BEGIN_SCN END_LSN END_SCN MAX_LSN MAX_SCN ARBITRATION_MEMBER DEGRADED_LIST LEARNER_LIST scn_to_timestamp(end_scn) --------- ------ ------------- -------- ------ ----------- ----------------------------- ----------- -------------------- ----------------- ------- ------------- ------------- ------------------- ------------- ------------------- ------------- ------------------- ------------------ ------------- ------------ ---------------------------- 1004 1001 192.168.111.18 2882 LEADER 8 {proposal_id:8, config_seq:2} RAW_WRITE 192.168.111.18:2882:1 1 YES 7367365373952 7359379906560 1729246581067688714 7367700897792 1729262466216039669 7367700897792 1729262466216039669 2024-10-18 22:41:06.216039 1004 1 192.168.111.18 2882 LEADER 9 {proposal_id:9, config_seq:2} RAW_WRITE 192.168.111.18:2882:1 1 YES 80928350208 80861245440 1729193452290250656 80958670724 1729263495362539967 80958670724 1729263495362539967 2024-10-18 22:58:15.362539