Note
This view is introduced since OceanBase Database V4.2.0.
Purpose
The V$OB_LS_LOG_RESTORE_STATUS view displays the log restore status at the log stream level for the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| LS_ID | bigint(20) | NO | The ID of the log stream. |
| SYNC_LSN | bigint(20) unsigned | NO | The LSN of the maximum consecutive majority checkpoint of the standby database, also known as the maximum consumption checkpoint. |
| SYNC_SCN | bigint(20) unsigned | NO | The SCN of the maximum consecutive majority checkpoint of the standby database, also known as the maximum consumption checkpoint. |
| SYNC_STATUS | varchar(128) | NO | The restore status of the log stream. Valid values:
|
| ERR_CODE | bigint(20) | NO | The error code, which is 0 during normal synchronization. |
| COMMENT | varchar(2048) | NO | The error details. This column is empty during normal synchronization. |
Sample query
Query the restore status of log streams at the tenant level for the current tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_LS_LOG_RESTORE_STATUS;
The query result is as follows:
+-----------+-------+-----------+---------------------+-------------+----------+---------+
| TENANT_ID | LS_ID | SYNC_LSN | SYNC_SCN | SYNC_STATUS | ERR_CODE | COMMENT |
+-----------+-------+-----------+---------------------+-------------+----------+---------+
| 1016 | 1 | 283804256 | 1736328456982102000 | NORMAL | 0 | |
| 1016 | 1001 | 196814299 | 1736328433807314000 | NORMAL | 0 | |
+-----------+-------+-----------+---------------------+-------------+----------+---------+
2 rows in set