Overview
The CDB_SCHEDULER_JOB_RUN_DETAILS view displays information about all scheduler jobs under all tenants.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| LOG_ID | decimal(20,0) | NO | This field is not supported. The default value is 0. |
| LOG_DATE | datetime | NO | Log entry. |
| OWNER | varchar(128) | NO | Owner of the job. |
| JOB_NAME | varchar(128) | NO | The name of the job. |
| JOB_SUBNAME | varchar(128) | NO | This field is not supported and its default value is NULL. |
| STATUS | varchar(128) | NO | Job status. |
| CODE | bigint(20) | YES | Error number when an error occurs during job execution. |
| REQ_START_DATE | datetime | NO | The expected start time of the job. |
| ACTUAL_START_DATE | datetime | NO | The actual start time of the job. |
| RUN_DURATION | decimal(20,0) | NO | Duration of job execution. |
| INSTANCE_ID | varchar(128) | NO | This field is not supported and its default value is NULL. |
| SESSION_ID | decimal(10,0) | NO | This field is not supported and its default value is NULL. |
| SLAVE_PID | varchar(128) | NO | This field is not supported and its default value is NULL. |
| CPU_USED | decimal(20,0) | NO | This field is not supported and its default value is NULL. |
| CREDENTIAL_OWNER | varchar(128) | NO | This field is not supported and its default value is NULL. |
| CREDENTIAL_NAME | varchar(128) | NO | This field is not supported and its default value is NULL. |
| DESTINATION_OWNER | varchar(128) | NO | Cross-database jobs are not currently supported. This field is set to NULL by default. |
| DESTINATION | varchar(128) | NO | Cross-database jobs are not currently supported. This field is set to NULL by default. |
| MESSAGE | varchar(4000) | NO | Error message returned by the job. |
| TENANT_ID | bigint(20) | NO | Tenant ID. |
| JOB | bigint(20) | NO | The name of the program job. |
| TIME | timestamp(6) | NO | The time when the job log was recorded, in seconds. |
| JOB_CLASS | varchar(30) | YES | The category of the program job. |
| GMT_CREATE | timestamp(6) | NO | The time when the job was created, in seconds. |
| GMT_MODIFIED | timestamp(6) | NO | The time when the job was modified, in seconds. |
Sample query
View information about all scheduled jobs under all tenants.
obclient(root@sys)[oceanbase]> SELECT * FROM oceanbase.CDB_SCHEDULER_JOB_RUN_DETAILS limit 1\G
The query result is as follows:
*************************** 1. row ***************************
LOG_ID: 0
LOG_DATE: NULL
OWNER: root@%
JOB_NAME: ASYNC_GATHER_STATS_JOB_PROC
JOB_SUBNAME: NULL
STATUS: SCHEDULED
CODE: -5001
REQ_START_DATE: 2025-08-29 11:57:22.818044
ACTUAL_START_DATE: NULL
RUN_DURATION: 0
INSTANCE_ID: NULL
SESSION_ID: NULL
SLAVE_PID: NULL
CPU_USED: NULL
CREDENTIAL_OWNER: NULL
CREDENTIAL_NAME: NULL
DESTINATION_OWNER: NULL
DESTINATION: NULL
MESSAGE: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'and m.tablet_id < 1000 order by ratio desc,table_id limit 139798281832208' at line 1
TENANT_ID: 1
JOB: 9
TIME: 2025-08-29 11:57:23.392851
JOB_CLASS: DEFAULT_JOB_CLASS
GMT_CREATE: 2025-08-29 11:57:23.392851
GMT_MODIFIED: 2025-08-29 11:57:23.392851
1 row in set (0.020 sec)
References
- Query information about all scheduler jobs in a tenant: DBA_SCHEDULER_JOB_RUN_DETAILS