Note
This view is available starting with V4.0.0.
Purpose
This view displays information about tenant-level tasks.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| JOB_ID | bigint(20) | NO | The task ID. |
| JOB_TYPE | varchar(128) | NO | The task type. Valid values:
|
| JOB_STATUS | varchar(128) | NO | The task status. Valid values: INPROGRESS: in progress.SUCCESS: succeeded.FAILED: failed. |
| 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 task modification time. |
| TENANT_ID | bigint(20) | YES | The tenant ID. |
| SQL_TEXT | longtext | YES | The related SQL statement. |
| 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 the tenant tasks of all tenants in the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_TENANT_JOBS\G
The query result is as follows:
*************************** 1. row ***************************
JOB_ID: 6
JOB_TYPE: ALTER_TENANT_PRIMARY_ZONE
JOB_STATUS: SUCCESS
RESULT_CODE: 0
PROGRESS: 100
START_TIME: 2025-01-10 10:33:52.307613
MODIFY_TIME: 2025-01-10 10:33:52.312021
TENANT_ID: 1002
SQL_TEXT: ALTER TENANT mysql001 PRIMARY_ZONE='RANDOM'
EXTRA_INFO: FROM: 'zone1', TO: 'RANDOM'
RS_SVR_IP: 172.xx.xxx.xxx
RS_SVR_PORT: 2882
1 row in set