Note
This view is available starting with V4.2.0.
Purpose
This 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 tenant ID. |
| LS_ID | bigint(20) | NO | The log stream ID. |
| SYNC_LSN | bigint(20) unsigned | NO | The LSN of the latest continuous majority log in the standby database or the latest consumable LSN. |
| SYNC_SCN | bigint(20) unsigned | NO | The SCN of the latest continuous majority log in the standby database or the latest consumable SCN. |
| SYNC_STATUS | varchar(128) | NO | The restore status of the log stream.
|
| ERR_CODE | bigint(20) | NO | The error code. 0 indicates normal synchronization. |
| COMMENT | varchar(2048) | NO | The error details. This column is empty during normal synchronization. |
Sample query
Query the log restore status at the log stream level for the current user 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