Overview

2023-08-01 06:02:28  Updated

The DBMS_JOB package schedules and manages jobs in the job queue.

Applicability

This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL mode.

Privileges

You do not need any special system privileges to use and manage the DBMS_JOB package. Only the owner of a job or a user granted the database administrator (DBA) privileges can modify or delete the job.

Usage notes

DBMS_JOB allows a job to run in multiple zones. By default, a job can run in any zone. However, only one zone can be specified for a job. You can specify the name of a zone to bind a job to the zone.

The following describes the procedure for creating, modifying, and running a job associated with a zone. If no associated zone is specified, the job can run in any zone.

  1. Call DBMS_JOB.SUBMIT to submit the job to the job queue.

  2. Call DBMS_JOB.ZONE to allocate a zone for running the job.

  3. Call DBMS_JOB.CHANGE to modify the custom parameters related to the job.

  4. Call DBMS_JOB.RUN to run the job.

  5. Stop the job.

Subprograms

The following table describes the DBMS_JOB subprograms supported by the current OceanBase Database version.

Subprogram Description
BROKEN Prohibits job execution.
CHANGE Modifies custom parameters related to a job.
ZONE Modifies the association between a job and a zone.
INTERVAL Modifies the execution interval of a specified job.
NEXT_DATE Modifies the next execution date of a specified job.
REMOVE Removes a specified job from the job queue.
RUN Forcibly runs a specified job.
SUBMIT Submits a new job to the job queue.
USER_EXPORT Generates the call text for re-creating a specified job.
WHAT Modifies the execution content of a specified job.

Contact Us