Note
This view is available starting with V4.2.1.
Overview
Displays the cross-tenant import task history at the table level for this tenant.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| TASK_ID | varchar(4096) | NO | Load balancing task ID |
| JOB_ID | bigint(20) | NO | Task ID |
| SRC_TENANT_ID | bigint(20) | NO | Source Tenant ID |
| SRC_TABLESPACE | varchar(128) | YES | TABLESPACE of the source table |
| SRC_TABLEGROUP | varchar(128) | YES | TABLEGROUP of the source table |
| SRC_DATABASE | varchar(128) | YES | DATABASE of Source Table |
| SRC_TABLE | varchar(128) | YES | Source Table Name |
| SRC_PARTITION | varchar(64) | YES | PARTITION NAME of SOURCE TABLE |
| TARGET_TABLESPACE | varchar(128) | YES | Remapped tablespace name. If not remapped, this field is empty. |
| TARGET_TABLEGROUP | varchar(128) | YES | Remap table group name. If not remapped, this field is empty. |
| TARGET_DATABASE | varchar(128) | YES | Remap database name. If not remapped, this field is empty. |
| TARGET_TABLE | varchar(128) | YES | The renamed table name. If no renaming occurred, this field is empty. |
| TABLE_COLUMN | bigint(20) | NO | Number of Table Columns |
| STATUS | varchar(64) | NO | Task status:
|
| START_TIMESTAMP | timestamp(6) | NO | Current Tenant Time at Task Start |
| COMPLETION_TIMESTAMP | timestamp(6) | NO | Current Tenant Time at Task Completion |
| CUMULATIVE_TS | bigint(20) | NO | Cumulative Time |
| TOTAL_INDEX_COUNT | bigint(20) | NO | Total Indexes |
| IMPORTED_INDEX_COUNT | bigint(20) | NO | Number of Imported Indexes |
| FAILED_INDEX_COUNT | bigint(20) | NO | Failed indexes imported |
| TOTAL_CONSTRAINT_COUNT | bigint(20) | NO | Total Constraints |
| IMPORTED_CONSTRAINT_COUNT | bigint(20) | NO | Number of Imported Constraints |
| FAILED_CONSTRAINT_COUNT | bigint(20) | NO | Number of Constraints Imported Failed |
| TOTAL_REF_CONSTRAINT_COUNT | bigint(20) | NO | Total Referential Constraints |
| IMPORTED_REF_CONSTRAINT_COUNT | bigint(20) | NO | Number of Imported Referential Constraints |
| FAILED_REF_CONSTRAINT_COUNT | bigint(20) | NO | Number of Failed Imported Referential Constraints |
| RESULT | varchar(64) | YES | Result of the task completion:
|
| COMMENT | longtext | YES | Remarks |
Sample query
Users can query the history of cross-tenant import tasks for table-level operations within their own tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_IMPORT_TABLE_TASK_HISTORY\G
The query result is as follows:
*************************** 1. row ***************************
TASK_ID: 247439
JOB_ID: 6
SRC_TENANT_ID: 1008
SRC_TABLESPACE: NULL
SRC_TABLEGROUP: NULL
SRC_DATABASE: infotest
SRC_TABLE: t2
SRC_PARTITION: NULL
TARGET_TABLESPACE: NULL
TARGET_TABLEGROUP: NULL
TARGET_DATABASE: infotest
TARGET_TABLE: newtb2
TABLE_COLUMN: 3
STATUS: FINISH
START_TIMESTAMP: 2025-01-07 16:11:33.111473
COMPLETION_TIMESTAMP: 2025-01-07 16:12:33.297206
CUMULATIVE_TS: -1
TOTAL_INDEX_COUNT: 0
IMPORTED_INDEX_COUNT: 0
FAILED_INDEX_COUNT: 0
TOTAL_CONSTRAINT_COUNT: 0
IMPORTED_CONSTRAINT_COUNT: 0
FAILED_CONSTRAINT_COUNT: 0
TOTAL_REF_CONSTRAINT_COUNT: 0
IMPORTED_REF_CONSTRAINT_COUNT: 0
FAILED_REF_CONSTRAINT_COUNT: 0
RESULT: SUCCESS
COMMENT:
1 row in set
