Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
This view displays information about all scheduled jobs in the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| OWNER | varchar(128) | NO | The owner of the scheduled job. |
| JOB_NAME | varchar(128) | NO | The name of the scheduled job. |
| JOB_SUBNAME | varchar(128) | NO | The subname of the scheduled job. |
| JOB_STYLE | varchar(17) | YES | The job style. The default value is NULL. |
| JOB_CREATOR | varchar(128) | NO | The creator of the scheduled 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 related to the job. |
| PROGRAM_NAME | text | YES | The name of the program related to the job. |
| JOB_TYPE | varchar(16) | YES | The type of job operation:
|
| 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 type of schedule. The default value is NULL. |
| START_DATE | datetime(6) | YES | The original start date of the job. |
| REPEAT_INTERVAL | text | YES | The inline plan PL/SQL expression or calendar string. |
| 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 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 an event-based job. |
| 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 to which the job belongs. |
| ENABLED | varchar(5) | YES | Whether the job is enabled. Valid values:
|
| AUTO_DROP | varchar(5) | YES | Whether the job is deleted after it is completed. Valid values:
|
| 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 job status. Valid values: |
| 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 number of failures allowed before the job is marked as damaged. |
| 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 duration of the last run of the job. |
| NEXT_RUN_DATE | datetime(6) | NO | The scheduled date for the next run of the job. |
| SCHEDULE_LIMIT | bigint(0) | NO | The time when the job will be rescheduled if it has not been run. |
| MAX_RUN_DURATION | bigint(20) | YES | The maximum allowed running duration of the job. |
| LOGGING_LEVEL | varchar(11) | NO | The logging level of the job. The default value is NULL. |
| STORE_OUTPUT | varchar(5) | NO | Whether to store the job output. The default value is NULL. |
| STOP_ON_WINDOW_CLOSE | varchar(5) | NO | Whether to stop the job when the window is closed. The default value is NULL. |
| INSTANCE_STICKINESS | varchar(5) | NO | Whether the job is sticky to the instance. The default value is NULL. |
| RAISE_EVENTS | text | NO | The events to be triggered. The default value is NULL. |
| SYSTEM | varchar(5) | NO | The system on which the job is scheduled to run. The default value is NULL. |
| JOB_WEIGHT | bigint(0) | NO | The weight of the job, which specifies the priority of the job when it is scheduled. |
| NLS_ENV | text | YES | The NLS environment 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 targets of the job. |
| DESTINATION_OWNER | varchar(261) | NO | The owner of the target of the job. |
| DESTINATION | varchar(261) | NO | The target of the job, that is, the object or location on which the job is to be 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 requested to run. |
| DEFERRED_DROP | varchar(5) | NO | Whether the job is to be deleted after it is completed. |
| ALLOW_RUNS_IN_RESTRICTED_MODE | varchar(5) | NO | Whether the job is allowed 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 | Whether the job is restartable. |
| CONNECT_CREDENTIAL_OWNER | varchar(128) | NO | The owner of the connection credential. |
| CONNECT_CREDENTIAL_NAME | varchar(128) | NO | The name of the connection credential. |
Sample query
View the running status of all scheduled 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