Overview
Displays the log restoration status of log streams in the current tenant.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| LS_ID | bigint(20) | NO | Log Stream ID |
| SYNC_LSN | bigint(20) unsigned | NO | Maximum Consecutive Majority LSN/Maximum Consumable LSN of Standby Database |
| SYNC_SCN | bigint(20) unsigned | NO | Maximum Consecutive Majority LSN/Maximum Consumable SCN of Standby Database |
| SYNC_STATUS | varchar(128) | NO | Log stream restore status.
|
| ERR_CODE | bigint(20) | NO | Error code. During normal synchronization, this error code is 0. |
| COMMENT | varchar(2048) | NO | Error details. This column is empty during normal synchronization. |
Sample query
You can query the recovery status of log streams in 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