The DROP_JOB procedure drops one or more jobs or all jobs in one or more job classes. When you drop a job, all parameters configured for the job are also dropped.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
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 list of names and separate them with commas (,). If you specify a job class, you must also specify the SYS schema. If you specify the name of a job class, the jobs that belong to the job class are dropped, but the job class itself is not dropped. |
| force | If you set this parameter to TRUE, the Scheduler first tries to stop running job instances and then drops the jobs. |
| defer | If you set this parameter to TRUE, the Scheduler drops the specified jobs after the running jobs are completed. |
| commit_semantics | The commit semantics. The following types are supported:
|
Considerations
If the force and defer parameters are set to FALSE and you call the DROP_JOB procedure to drop a job that is running, the execution fails. Depending on the setting of the commit_semantics parameter, the entire call to the DROP_JOB procedure may fail.
If the force and defer parameters are set to TRUE, an error is returned.
Examples
BEGIN
DBMS_SCHEDULER.DROP_JOB(job_name => 'job_test');
END;