Note
This view is available starting with V4.2.0.
Purpose
This view records the location range of the data dictionary in the system log stream, facilitating CDC for data dictionary consumption.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID.
|
| SNAPSHOT_SCN | bigint(20) unsigned | NO | The SNAPSHOT SCN of the corresponding tenant when the data dictionary was generated. |
| REPORT_TIME | timestamp(6) | NO | The time when the data dictionary generation was completed and reported to the internal table. (Unit: microseconds) |
| START_LSN | bigint(20) unsigned | NO | The LSN of the first log in the system log stream where the data dictionary is persisted for the tenant. |
| END_LSN | bigint(20) unsigned | NO | The LSN of the last log in the system log stream where the data dictionary is persisted for the tenant. |
Sample query
Query the location range of the data dictionaries of all user tenants in the system log stream for the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_DATA_DICTIONARY_IN_LOG;
The query result is as follows:
+-----------+---------------------+----------------------------+-----------+----------+
| TENANT_ID | SNAPSHOT_SCN | REPORT_TIME | START_LSN | END_LSN |
+-----------+---------------------+----------------------------+-----------+----------+
| 1002 | 1722408567371559602 | 2024-07-31 14:49:27.420098 | 9118467 | 9118467 |
| 1004 | 1722408697334096435 | 2024-07-31 14:51:37.373029 | 13706567 | 13706567 |
+-----------+---------------------+----------------------------+-----------+----------+
2 rows in set