Note
This view is introduced since OceanBase Database V3.2.3.
Purpose
This view displays information about the scheduled jobs that the current user can access.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| OWNER | VARCHAR2(128) | NO | The owner of the scheduled job. |
| JOB_NAME | VARCHAR2(128) | NO | The name of the scheduled job. |
| JOB_SUBNAME | VARCHAR2(128) | NO | The subname of the scheduled job. |
| JOB_STYLE | VARCHAR2(17) | YES | The job style. The default value is NULL. |
| JOB_CREATOR | VARCHAR2(128) | NO | The creator of the scheduled job. |
| CLIENT_ID | VARCHAR2(65) | NO | The client identifier of the user who created the job. |
| GLOBAL_UID | VARCHAR2(33) | NO | The global user identifier of the user who created the job. |
| PROGRAM_OWNER | VARCHAR2(4000) | NO | The owner of the program associated with the job. |
| PROGRAM_NAME | VARCHAR2(4000) | YES | The name of the program associated with the job. |
| JOB_TYPE | VARCHAR2(16) | YES | The job operation type. Valid values include:
|
| JOB_ACTION | VARCHAR2(4000) | YES | The inline job operation. |
| NUMBER_OF_ARGUMENTS | NUMBER | YES | The number of inline job parameters. |
| SCHEDULE_OWNER | VARCHAR2(4000) | NO | The owner of the schedule used by the job. |
| SCHEDULE_NAME | VARCHAR2(4000) | NO | The name of the schedule used by the job. |
| SCHEDULE_TYPE | VARCHAR2(12) | NO | The schedule type. The default value is NULL. |
| START_DATE | TIMESTAMP(6) WITH TIME ZONE | YES | The original start date of the job. |
| REPEAT_INTERVAL | VARCHAR2(4000) | YES | The inline plan PL/SQL expression or calendar string. |
| EVENT_QUEUE_OWNER | VARCHAR2(128) | NO | The owner of the source queue to which events are to be triggered. |
| EVENT_QUEUE_NAME | VARCHAR2(128) | NO | The name of the source queue to which events are to be triggered. |
| EVENT_QUEUE_AGENT | VARCHAR2(523) | NO | The name of the AQ agent used by the user on the source queue. |
| EVENT_CONDITION | VARCHAR2(4000) | NO | The subscription rule for events on the source queue. |
| EVENT_RULE | VARCHAR2(261) | NO | The name of the rule used by the coordinator to trigger an event-based job. |
| FILE_WATCHER_OWNER | VARCHAR2(261) | NO | The owner of the file watcher on which the job is based. |
| FILE_WATCHER_NAME | VARCHAR2(261) | NO | The name of the file watcher on which the job is based. |
| END_DATE | TIMESTAMP(6) WITH TIME ZONE | YES | The date when the job will no longer run. |
| JOB_CLASS | VARCHAR2(128) | YES | The name of the job class to which the job belongs. |
| ENABLED | VARCHAR2(5) | YES | Indicates whether the job is enabled. Valid values include:
|
| AUTO_DROP | VARCHAR2(5) | YES | Indicates whether the job is to be deleted after it is completed. Valid values include:
|
| RESTART_ON_RECOVERY | VARCHAR2(5) | NO | The default value is NULL. |
| RESTART_ON_FAILURE | VARCHAR2(5) | NO | The default value is NULL. |
| STATE | VARCHAR2(15) | YES | The job status. Valid values include: |
| JOB_PRIORITY | NUMBER | NO | The priority of the job relative to other jobs of the same type. |
| RUN_COUNT | NUMBER | YES | The number of times the job has run. |
| MAX_RUNS | NUMBER | NO | The maximum number of times the job is scheduled to run. |
| FAILURE_COUNT | NUMBER | YES | The number of times the job has failed. |
| MAX_FAILURES | NUMBER | NO | The number of times the job can fail before it is marked as damaged. |
| RETRY_COUNT | NUMBER | YES | The number of times the job has been retried. |
| LAST_START_DATE | TIMESTAMP(6) WITH TIME ZONE | YES | The last date when the job started running. |
| LAST_RUN_DURATION | INTERVAL DAY (9) TO SECOND (6) | NO | The time required to complete the job during the last run. |
| NEXT_RUN_DATE | TIMESTAMP(6) WITH TIME ZONE | NO | The date when the job is scheduled to run next. |
| SCHEDULE_LIMIT | INTERVAL DAY (3) TO SECOND (0) | NO | The time when the job will be rescheduled if it has not been run. |
| MAX_RUN_DURATION | INTERVAL DAY (3) TO SECOND (0) | NO | The maximum allowed running time of the job. |
| LOGGING_LEVEL | VARCHAR2(11) | NO | The default value is NULL. |
| STORE_OUTPUT | VARCHAR2(5) | NO | The default value is NULL. |
| STOP_ON_WINDOW_CLOSE | VARCHAR2(5) | NO | The default value is NULL. |
| INSTANCE_STICKINESS | VARCHAR2(5) | NO | The default value is NULL |
| RAISE_EVENTS | VARCHAR2(4000) | NO | The default value is NULL. |
| SYSTEM | VARCHAR2(5) | NO | The default value is NULL. |
| JOB_WEIGHT | NUMBER | NO | The weight of the job. The weight determines the priority of the job when it is scheduled. |
| NLS_ENV | VARCHAR2(4000) | YES | The NLS environment settings of the job. |
| SOURCE | VARCHAR2(128) | NO | The source code or script of the job. |
| NUMBER_OF_DESTINATIONS | NUMBER | NO | The number of job destinations. |
| DESTINATION_OWNER | VARCHAR2(261) | NO | The owner of the job destination. |
| DESTINATION | VARCHAR2(261) | NO | The job destination, which is the object or location where the job is to be executed. |
| CREDENTIAL_OWNER | VARCHAR2(128) | NO | The owner of the credential. |
| CREDENTIAL_NAME | VARCHAR2(128) | NO | The name of the credential. |
| INSTANCE_ID | NUMBER | YES | The ID of the instance on which the job is requested to run. |
| DEFERRED_DROP | VARCHAR2(5) | NO | Indicates whether the job is to be deleted after it is completed. Valid values include:
|
| ALLOW_RUNS_IN_RESTRICTED_MODE | VARCHAR2(5) | NO | Indicates whether the job is allowed to run in restricted mode. Valid values include:
|
| COMMENTS | VARCHAR2(4000) | YES | The comments or description of the job. |
| FLAGS | NUMBER | NO | The flags of the job. |
| RESTARTABLE | VARCHAR2(5) | NO | Indicates whether the job is restartable. |
| CONNECT_CREDENTIAL_OWNER | VARCHAR2(128) | NO | The owner of the connection credential. |
| CONNECT_CREDENTIAL_NAME | VARCHAR2(128) | NO | The name of the connection credential. |
Sample query
View the running status of all scheduled jobs in the current tenant.
obclient [SYS]> SELECT JOB_NAME, ENABLED, NEXT_RUN_DATE, STATE, LAST_START_DATE FROM SYS.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 | 21-MAR-25 04.08.43.845933 PM +08:00 | SCHEDULED | 21-MAR-25 03.53.43.847413 PM +08:00 |
| FRIDAY_WINDOW | 1 | 21-MAR-25 10.00.00.000000 PM +08:00 | NULL | NULL |
| JOB$_1125899907365728 | 1 | 21-MAR-25 03.59.49.000000 PM +08:00 | SCHEDULED | 21-MAR-25 03.59.41.001649 PM +08:00 |
| MONDAY_WINDOW | 1 | 24-MAR-25 10.00.00.000000 PM +08:00 | NULL | NULL |
| OPT_STATS_HISTORY_MANAGER | 1 | 22-MAR-25 01.53.43.845874 PM +08:00 | SCHEDULED | 21-MAR-25 01.53.43.847613 PM +08:00 |
| SATURDAY_WINDOW | 1 | 22-MAR-25 10.00.00.000000 PM +08:00 | NULL | NULL |
| SCHEDULED_TRIGGER_DUMP_DATA_DICT | 1 | 21-MAR-25 05.54.00.000000 PM +08:00 | SCHEDULED | 21-MAR-25 03.54.00.001459 PM +08:00 |
| SCHEDULED_TRIGGER_PARTITION_BALANCE | 1 | 22-MAR-25 12.00.00.000000 AM +08:00 | SCHEDULED | 21-MAR-25 12.00.00.001495 AM +08:00 |
| SPM_STATS_MANAGER | 1 | 22-MAR-25 01.00.00.000000 AM +08:00 | SCHEDULED | 21-MAR-25 01.00.00.002031 AM +08:00 |
| SUNDAY_WINDOW | 1 | 23-MAR-25 10.00.00.000000 PM +08:00 | NULL | NULL |
| THURSDAY_WINDOW | 1 | 27-MAR-25 10.00.00.000000 PM +08:00 | SCHEDULED | 20-MAR-25 10.00.00.001965 PM +08:00 |
| TUESDAY_WINDOW | 1 | 25-MAR-25 10.00.00.000000 PM +08:00 | NULL | NULL |
| WEDNESDAY_WINDOW | 1 | 26-MAR-25 10.00.00.000000 PM +08:00 | SCHEDULED | 19-MAR-25 10.00.00.002020 PM +08:00 |
+-------------------------------------+---------+-------------------------------------+-----------+-------------------------------------+
13 rows in set