You can query the CDB_OB_LOG_RESTORE_SOURCE and DBA_OB_LOG_RESTORE_SOURCE views for log restore sources.
Procedure
Log in as the administrator to the standby tenant or the
systenant of the cluster where the standby tenant resides.Query the log restore source.
Execute the following statement in the
systenant to query the log restore source:SELECT * FROM oceanbase.CDB_OB_LOG_RESTORE_SOURCE;Execute the following statement in a user tenant to query the log restore source:
MySQL mode:
SELECT * FROM oceanbase.DBA_OB_LOG_RESTORE_SOURCE;Oracle mode:
SELECT * FROM SYS.DBA_OB_LOG_RESTORE_SOURCE;
A sample query result in the archive-based Physical Standby Database solution is as follows:
+-----------+----+----------+--------------------------------+---------------------+ | TENANT_ID | ID | TYPE | VALUE | RECOVERY_UNTIL_SCN | +-----------+----+----------+--------------------------------+---------------------+ | 1006 | 1 | LOCATION | file:///data/1/sh_archive | 4611686018427387903 | +-----------+----+----------+--------------------------------+---------------------+ 1 row in setIn the query result, the value of the
TYPEfield isLOCATION, which indicates that the standby tenant synchronizes archive logs from the primary tenant or source standby tenant.A sample query result in the network-based Physical Standby Database solution is as follows:
+-----------+----+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+ | TENANT_ID | ID | TYPE | VALUE | RECOVERY_UNTIL_SCN | +-----------+----+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+ | 1006 | 1 | SERVICE | IP_LIST=xx.xx.xx.22:17855;xx.xx.xx.23:17857;xx.xx.xx.24:17859,USER=rep_user@mysql,PASSWORD=***********************************,TENANT_ID=1004,CLUSTER_ID=1,COMPATIBILITY_MODE=MYSQL,IS_ENCRYPTED=true | 4611686018427387903 | +-----------+----+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+ 1 row in setIn the query result, the value of the
TYPEfield isSERVICE, which indicates that the standby tenant connects to the primary tenant or source standby tenant to synchronize logs.Query the log synchronization link.
Execute the following statement in the
systenant to query the log synchronization link:SELECT * FROM oceanbase.GV$OB_LOG_TRANSPORT_DEST_STAT;Execute the following statement in a user tenant to query the log synchronization link:
MySQL mode:
SELECT * FROM oceanbase.GV$OB_LOG_TRANSPORT_DEST_STAT;Oracle mode:
SELECT * FROM SYS.GV$OB_LOG_TRANSPORT_DEST_STAT;