Note
This view is available starting with V4.2.0.
Purpose
This view displays the restore status of log streams at the user tenant level.
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 maximum continuous majority on the standby database or the maximum consumable LSN. |
| SYNC_SCN | bigint(20) unsigned | NO | The SCN of the maximum continuous majority on the standby database or the maximum consumable SCN. |
| SYNC_STATUS | varchar(128) | NO | The restore status of the log stream.
|
| ERR_CODE | bigint(20) | NO | The error code. If the log stream is being synchronized normally, this value is 0. |
| COMMENT | varchar(2048) | NO | The error details. If the log stream is being synchronized normally, this column is empty. |
Sample query
Query the restore status of log streams at the user tenant level.
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 | 283495079 | 1736328216876132000 | NORMAL | 0 | |
| 1016 | 1001 | 196679703 | 1736328313704108000 | NORMAL | 0 | |
+-----------+-------+-----------+---------------------+-------------+----------+---------+
2 rows in set