You can view log restore source information through the CDB_OB_LOG_RESTORE_SOURCE and DBA_OB_LOG_RESTORE_SOURCE views.
Procedure
Log in to the standby tenant or the
systenant of the cluster where the standby tenant is located, using the administrator.Execute the following statements to view log restore source information.
To view log restore source information in the
systenant:SELECT * FROM oceanbase.CDB_OB_LOG_RESTORE_SOURCE;To view log restore source information in a user tenant:
For MySQL mode:
SELECT * FROM oceanbase.DBA_OB_LOG_RESTORE_SOURCE;For Oracle mode:
SELECT * FROM SYS.DBA_OB_LOG_RESTORE_SOURCE;
In the feature of log archiving-based physical standby database, here is an example of the query result for log restore source information of the standby tenant:
+-----------+----+----------+--------------------------------+---------------------+ | 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
TYPEcolumn isLOCATION, which indicates that the standby tenant synchronizes logs through log archiving from the primary tenant or the source standby tenant .In the feature of network-based physical standby database, here is an example of the query result for log restore source information of the standby tenant:
+-----------+----+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+ | 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
TYPEcolumn isSERVICE, which indicates that the standby tenant synchronizes logs by connecting to the primary tenant or the source standby tenant via network.