Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The oceanbase.DBA_OB_TENANT_JOBS view displays the tenant-level job information.
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. Valid values:
|
| 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. The value range is [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. |
| 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
The system tenant queries tenant task information for all tenants.
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