Note
This view is available starting with V4.2.5 BP4.
Overview
The oceanbase.DBA_OB_TENANT_flashBACK_LOG_SCN view displays information about each log trim operation in the current tenant.
Columns
field |
Type |
Is NULL |
Description |
|---|---|---|---|
| TIMESTAMP | timestamp(6) | NO | Creation time, in microseconds |
| OP_TYPE | varchar(64) | NO | Operation type. Valid values:
|
| FLASHBACK_LOG_SCN | bigint(20) | YES | End point for log trimming from the tail |
| SWITCHOVER_EPOCH | bigint(20) | YES | Tenant role switched toNORMALWhen the status isSWITCHOVER_EPOCH.SWITCHOVER_EPOCHis a unique identifier used to identify tenant switchover/failover operations. |
Sample query
Query information about each log truncation in the current tenant.
obclient [oceanbase]> SELECT * FROM DBA_OB_TENANT_FLASHBACK_LOG_SCN;
The return result is as follows:
+-----------+----------------------------+------------------+---------------------+---------------------+
| TENANT_ID | TIMESTAMP | SWITCHOVER_EPOCH | OP_TYPE | FLASHBACK_LOG_SCN |
+-----------+----------------------------+------------------+---------------------+---------------------+
| 1006 | 2025-05-21 16:48:53.583749 | 1747817333380437 | FAILOVER TO PRIMARY | 1747817331313513000 |
+-----------+----------------------------+------------------+---------------------+---------------------+
1 row in set
