The DROP_JOB procedure is used to delete one or more jobs or all jobs in one or more job classes. When a job is deleted, all parameter values set for the job are also deleted.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
DBMS_SCHEDULER.DROP_JOB (
job_name IN VARCHAR2,
force IN BOOLEAN DEFAULT FALSE,
defer IN BOOLEAN DEFAULT FALSE,
commit_semantics IN VARCHAR2 DEFAULT 'null');
Parameters
| Parameter | Description |
|---|---|
| job_name | The name of the job or job class. You can specify a comma-separated list of names. For a job class, you must specify the SYS schema. If you specify the name of a job class, all jobs in the job class are deleted, but the job class itself is not deleted. |
| force | If set to TRUE, the scheduler attempts to stop running job instances before deleting the job. |
| defer | If set to TRUE, the scheduler attempts to allow running job instances to complete before deleting the job. |
| commit_semantics | The commit semantics. Valid values:
|
Considerations
If both force and defer are set to FALSE, and the job is running when you call DROP_JOB, the attempt to delete the job will fail. The entire DROP_JOB call may fail depending on the commit_semantics setting.
If both force and defer are set to TRUE, an error will occur.
Examples
BEGIN
DBMS_SCHEDULER.DROP_JOB(job_name => 'job_test');
END;
