Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The oceanbase.DBA_OB_UNIT_JOBS view displays all unit-related jobs.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| JOB_ID | bigint(20) | NO | The ID of the job. |
| JOB_TYPE | varchar(128) | NO | The type of the job. MIGRATE_UNIT indicates a unit migration job. |
| JOB_STATUS | varchar(128) | NO | The status of the job. Valid values: INPROGRESS: The job is ongoing.SUCCESS: The job succeeded.FAILED: The job failed. |
| RESULT_CODE | bigint(20) | YES | The result code of the job. |
| PROGRESS | bigint(20) | NO | The progress of the job, in percentage. Value range: [0,100]. |
| START_TIME | timestamp(6) | YES | The start time of the job. |
| MODIFY_TIME | timestamp(6) | YES | The time when the job was last modified. |
| TENANT_ID | bigint(20) | YES | The ID of the tenant. NULL: The unit does not belong to any tenant. |
| UNIT_ID | bigint(20) | YES | The ID of the unit. |
| SQL_TEXT | longtext | YES | The related SQL string. |
| EXTRA_INFO | varchar(512) | YES | The additional information. |
| RS_SVR_IP | varchar(46) | NO | The IP address of the RootService server. |
| RS_SVR_PORT | bigint(20) | NO | The port number of the RootService server. |
Sample query
Query all unit-related task information 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 unit migration, see Replica migration.