You can query log restore sources from the CDB_OB_LOG_RESTORE_SOURCE and DBA_OB_LOG_RESTORE_SOURCE views.
Procedure
Log on 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 view the log restore source:SELECT * FROM oceanbase.CDB_OB_LOG_RESTORE_SOURCE;Execute the following statement in a user tenant to view the log restore source:
MySQL mode:
SELECT * FROM oceanbase.DBA_OB_LOG_RESTORE_SOURCE;Oracle mode:
SELECT * FROM SYS.DBA_OB_LOG_RESTORE_SOURCE;
The query result in the Physical Standby Database solution based on log archiving 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 archived logs from the primary tenant or source standby tenant.The 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.