Note
This view is available starting with V4.0.0.
Purpose
This view displays all unit-related tasks.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| JOB_ID | bigint(20) | NO | The task ID. |
| JOB_TYPE | varchar(128) | NO | The task type. Valid value: MIGRATE_UNIT, which indicates a unit migration task. |
| JOB_STATUS | varchar(128) | NO | The task status. Valid values:
|
| RESULT_CODE | bigint(20) | YES | The task exit code. |
| PROGRESS | bigint(20) | NO | The task progress, in percentage. Value range: [0, 100] |
| START_TIME | timestamp(6) | YES | The task start time. |
| MODIFY_TIME | timestamp(6) | YES | The last modification time of the task. |
| TENANT_ID | bigint(20) | YES | The tenant ID. Valid values:
|
| UNIT_ID | bigint(20) | YES | The unit ID. |
| SQL_TEXT | longtext | YES | The SQL statement related to the task. |
| EXTRA_INFO | varchar(512) | YES | Additional information. |
| RS_SVR_IP | varchar(46) | NO | The IP address of the Root Service server. |
| RS_SVR_PORT | bigint(20) | NO | The port number of the Root Service server. |
Sample query
Query all unit-related tasks in the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_UNIT_JOBS;
The query result is as follows:
--------------+------------+-------------+----------+----------------------------+----------------------------+-----------+---------+----------+------------+----------------+-------------+
| JOB_ID | JOB_TYPE | JOB_STATUS | RESULT_CODE | PROGRESS | START_TIME | MODIFY_TIME | TENANT_ID | UNIT_ID | SQL_TEXT | EXTRA_INFO | RS_SVR_IP | RS_SVR_PORT |
+--------+--------------+------------+-------------+----------+----------------------------+----------------------------+-----------+---------+----------+------------+----------------+-------------+
| 6 | MIGRATE_UNIT | INPROGRESS | NULL | 0 | 2025-07-04 11:27:51.957456 | 2025-07-04 11:27:51.957456 | 1006 | 1008 | NULL | NULL | 172.xx.xxx.xxx | 2882 |
+--------+--------------+------------+-------------+----------+----------------------------+----------------------------+-----------+---------+----------+------------+----------------+-------------+
1 row in set
References
For more information about how to migrate a unit, see Migrate a unit.
