ENABLE

2024-06-28 05:30:31  Updated

The ENABLE procedure enables a program or job.

When an object is enabled, the enabled parameter of the object is set to TRUE. By default, a newly created program or job is disabled.

If a job is disabled and then enabled, the Scheduler automatically runs the job based on its schedule.

A validity check is performed before the object is enabled. If the object fails the check, the object cannot be enabled, and the corresponding error message is returned. If the object is already enabled, no error is returned.

Applicability

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

Syntax

DBMS_SCHEDULER.ENABLE (
job_name              IN VARCHAR2);

Parameters

Parameter Description
job_name The name of the object being enabled by the Scheduler. You can specify a list of names and separate them with commas (,). If you specify a job class name, all jobs in the class are enabled.

Considerations

You can use ENABLE on any schemas except for the SYS schema.

Examples

BEGIN
   DBMS_SCHEDULER.ENABLE(job_name => 'job_test');
END;

Contact Us