Note
This view is available starting with V4.2.5 BP4.
Overview
The CDB_OB_TENANT_flashBACK_LOG_SCN view displays information about each log trim operation for all tenants in the cluster.
Columns
field |
Type |
Is NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| 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_EPOCHA unique identifier used to identify a tenant role switchover/failover operation. |
Sample query
Query information about each log compaction in all tenants of the current cluster.
obclient [oceanbase]> SELECT * FROM CDB_OB_TENANT_FLASHBACK_LOG_SCN;
The return result is as follows:
+-----------+----------------------------+------------------+-----------------------+---------------------+
| TENANT_ID | TIMESTAMP | SWITCHOVER_EPOCH | OP_TYPE | FLASHBACK_LOG_SCN |
+-----------+----------------------------+------------------+-----------------------+---------------------+
| 1004 | 2025-05-21 16:48:54.301743 | 1747817334299290 | FLASHBACK STANDBY LOG | 1747817331313513000 |
| 1004 | 2025-05-21 16:49:57.628607 | 1747817397628454 | FLASHBACK STANDBY LOG | 4611686018427387903 |
| 1004 | 2025-05-21 16:50:03.609287 | 1747817403609336 | FLASHBACK STANDBY LOG | 4611686018427387903 |
| 1004 | 2025-05-21 16:50:07.389331 | 1747817407389833 | FLASHBACK STANDBY LOG | 4611686018427387903 |
| 1004 | 2025-05-21 16:50:11.191687 | 1747817411192153 | FLASHBACK STANDBY LOG | 4611686018427387903 |
| 1004 | 2025-05-21 16:50:45.326779 | 1747817445326702 | FLASHBACK STANDBY LOG | 4611686018427387903 |
| 1006 | 2025-05-21 16:48:53.583749 | 1747817333380437 | FAILOVER TO PRIMARY | 1747817331313513000 |
+-----------+----------------------------+------------------+-----------------------+---------------------+
7 rows in set
