Note
This view is available starting with V4.0.0.
Purpose
This view displays information about all scheduler jobs in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| OWNER | varchar(128) | NO | The owner of the job. |
| JOB_NAME | varchar(128) | NO | The name of the job. |
| JOB_SUBNAME | varchar(128) | NO | The subname of the job. |
| JOB_STYLE | varchar(17) | YES | The default value is NULL. |
| JOB_CREATOR | varchar(128) | NO | The creator of the job. |
| CLIENT_ID | varchar(65) | NO | The client identifier of the user who created the job. |
| GLOBAL_UID | varchar(33) | NO | The global user identifier of the user who created the job. |
| PROGRAM_OWNER | text | NO | The owner of the program associated with the job. |
| PROGRAM_NAME | text | YES | The name of the program associated with the job. |
| JOB_TYPE | varchar(16) | YES | The type of the job operation. Valid values:
|
| JOB_ACTION | text | YES | The inline job operation. |
| NUMBER_OF_ARGUMENTS | bigint(20) | YES | The number of inline job parameters. |
| SCHEDULE_OWNER | text | NO | The owner of the schedule used by the job. |
| SCHEDULE_NAME | text | NO | The name of the schedule used by the job. |
| SCHEDULE_TYPE | varchar(12) | NO | The default value is NULL. |
| START_DATE | datetime(6) | YES | The original scheduled start date of the job. |
| REPEAT_INTERVAL | text | YES | The inline PL/SQL expression or calendar string of the schedule. |
| EVENT_QUEUE_OWNER | varchar(128) | NO | The owner of the source queue where events are triggered. |
| EVENT_QUEUE_NAME | varchar(128) | NO | The name of the source queue where events are triggered. |
| EVENT_QUEUE_AGENT | text | NO | The name of the AQ agent used by the user on the event source queue. |
| EVENT_CONDITION | text | NO | The subscription rule for events on the source queue. |
| EVENT_RULE | varchar(261) | NO | The name of the rule used by the coordinator to trigger event-based jobs. |
| FILE_WATCHER_OWNER | varchar(261) | NO | The owner of the file watcher on which the job is based. |
| FILE_WATCHER_NAME | varchar(261) | NO | The name of the file watcher on which the job is based. |
| END_DATE | datetime(6) | YES | The date when the job will no longer run. |
| JOB_CLASS | varchar(128) | YES | The name of the job category associated with the job. |
| ENABLED | varchar(5) | YES | Indicates whether the job is enabled:
|
| AUTO_DROP | varchar(5) | YES | Indicates whether the job is deleted after it is completed:
|
| RESTART_ON_RECOVERY | varchar(5) | NO | The default value is NULL. |
| RESTART_ON_FAILURE | varchar(5) | NO | The default value is NULL. |
| STATE | varchar(15) | YES | The current state of the job:
|
| JOB_PRIORITY | bigint(0) | NO | The priority of the job relative to other jobs of the same type. |
| RUN_COUNT | bigint(20) | YES | The number of times the job has run. |
| MAX_RUNS | bigint(0) | NO | The maximum number of times the job is scheduled to run. |
| FAILURE_COUNT | bigint(20) | YES | The number of times the job has failed. |
| MAX_FAILURES | bigint(0) | NO | The maximum number of times the job is allowed to fail before it is marked as broken. |
| RETRY_COUNT | bigint(20) | YES | The number of times the job has been retried. |
| LAST_START_DATE | datetime(6) | YES | The last date when the job started running. |
| LAST_RUN_DURATION | bigint(20) | YES | The time spent completing the job during the last run. |
| NEXT_RUN_DATE | datetime(6) | NO | The next date when the job is scheduled to run. |
| SCHEDULE_LIMIT | bigint(0) | NO | The time when the job will be rescheduled if it has not run yet. |
| MAX_RUN_DURATION | bigint(20) | YES | The maximum duration of the job. |
| LOGGING_LEVEL | varchar(11) | NO | NULL by default. |
| STORE_OUTPUT | varchar(5) | NO | NULL by default. |
| STOP_ON_WINDOW_CLOSE | varchar(5) | NO | NULL by default. |
| INSTANCE_STICKINESS | varchar(5) | NO | NULL by default. |
| RAISE_EVENTS | text | NO | NULL by default. |
| SYSTEM | varchar(5) | NO | NULL by default. |
| JOB_WEIGHT | bigint(0) | NO | The weight of the job. This parameter specifies the priority of the job during scheduling. |
| NLS_ENV | text | YES | The national language settings of the job. |
| SOURCE | varchar(128) | NO | The source code or script of the job. |
| NUMBER_OF_DESTINATIONS | bigint(0) | NO | The number of destinations for the job. |
| DESTINATION_OWNER | varchar(261) | NO | The owner of the destination of the job. |
| DESTINATION | varchar(261) | NO | The destination of the job, that is, the object or location where the job is executed. |
| CREDENTIAL_OWNER | varchar(128) | NO | The owner of the credential. |
| CREDENTIAL_NAME | varchar(128) | NO | The name of the credential. |
| INSTANCE_ID | bigint(21) | YES | The ID of the instance on which the job is to be executed. |
| DEFERRED_DROP | varchar(5) | NO | Indicates whether to delay the drop of the job. |
| ALLOW_RUNS_IN_RESTRICTED_MODE | varchar(5) | NO | Indicates whether to allow the job to run in restricted mode. |
| COMMENTS | text | YES | The comments or description of the job. |
| FLAGS | bigint(20) | NO | The flags of the job. |
| RESTARTABLE | varchar(5) | NO | Indicates whether to restart the job. |
| CONNECT_CREDENTIAL_OWNER | varchar(128) | NO | The owner of the connection credential. |
| CONNECT_CREDENTIAL_NAME | varchar(128) | NO | The name of the connection credential. |
| THIS_DATE | DATETIME(6) | YES | The start time of the current scheduling.
NoteThis column is available starting with V4.6.0. |
| USER_ID | BIGINT(20) | YES | The user_id of the JOB.
NoteThis column is available starting with V4.6.0. |
| DATABASE_ID | BIGINT(20) | YES | The database_id of the JOB.
NoteThis column is available starting with V4.6.0. |
| THIS_EXEC_DATE | DATETIME(6) | YES | The start time of the current execution.
NoteThis column is available starting with V4.6.0. |
| THIS_EXEC_ADDR | VARCHAR(128) | YES | The address of the OBServer node where the current execution is performed.
NoteThis column is available starting with V4.6.0. |
| THIS_EXEC_TRACE_ID | VARCHAR(128) | YES | The trace_id of the current execution.
NoteThis column is available starting with V4.6.0. |
Sample query
View the running status of all scheduler jobs in the current tenant.
obclient [oceanbase]> SELECT JOB_NAME, ENABLED, NEXT_RUN_DATE, STATE, LAST_START_DATE FROM oceanbase.DBA_SCHEDULER_JOBS;
The query result is as follows:
+-------------------------------------+---------+----------------------------+-----------+----------------------------+
| JOB_NAME | ENABLED | NEXT_RUN_DATE | STATE | LAST_START_DATE |
+-------------------------------------+---------+----------------------------+-----------+----------------------------+
| ASYNC_GATHER_STATS_JOB_PROC | 1 | 2025-03-21 16:08:11.812271 | SCHEDULED | 2025-03-21 15:53:11.813913 |
| FRIDAY_WINDOW | 1 | 2025-03-21 22:00:00.000000 | NULL | NULL |
| MONDAY_WINDOW | 1 | 2025-03-24 22:00:00.000000 | NULL | NULL |
| OPT_STATS_HISTORY_MANAGER | 1 | 2025-03-22 13:53:11.812220 | SCHEDULED | 2025-03-21 13:53:11.813703 |
| SATURDAY_WINDOW | 1 | 2025-03-22 22:00:00.000000 | NULL | NULL |
| SCHEDULED_TRIGGER_DUMP_DATA_DICT | 1 | 2025-03-21 17:54:00.000000 | SCHEDULED | 2025-03-21 15:54:00.001537 |
| SCHEDULED_TRIGGER_PARTITION_BALANCE | 1 | 2025-03-22 00:00:00.000000 | SCHEDULED | 2025-03-21 00:00:00.001456 |
| SPM_STATS_MANAGER | 1 | 2025-03-22 01:00:00.000000 | SCHEDULED | 2025-03-21 01:00:00.002017 |
| SUNDAY_WINDOW | 1 | 2025-03-23 22:00:00.000000 | NULL | NULL |
| THURSDAY_WINDOW | 1 | 2025-03-27 22:00:00.000000 | SCHEDULED | 2025-03-20 22:00:00.002084 |
| TUESDAY_WINDOW | 1 | 2025-03-25 22:00:00.000000 | NULL | NULL |
| WEDNESDAY_WINDOW | 1 | 2025-03-26 22:00:00.000000 | SCHEDULED | 2025-03-19 22:00:00.002020 |
+-------------------------------------+---------+----------------------------+-----------+----------------------------+
12 rows in set
