DBMS_JOB package is used to manage and schedule job in Oracle. Given below is a simple example with detailed steps which illustrates DBMS_JOB.
The requirement is to insert employee details into the table EMPLOYEES. When the job is invoked the details would be inserted. The details needs to passed as parameters while SUBMITting the job.
01]How to create the procedure which inserts a value to the employees table.
CREATE OR REPLACE PROCEDURE my_procedure
INSERT INTO employees
 How to Sumbit a job to job queue.
This job is scheduled to run everyday.
job OUT BINARY_INTEGER,
what IN VARCHAR2,
next_date IN DATE DEFAULT sysdate,
interval IN VARCHAR2 DEFAULT ‘null’,
no_parse IN BOOLEAN DEFAULT FALSE,
instance IN BINARY_INTEGER DEFAULT any_instance,
force IN BOOLEAN DEFAULT FALSE);
According to our requirement, the field WHAT can be modified.
How to find the job number from dba_jobs.
select JOB from dba_jobs;
How to Execute the job
How to Remove a job
How to modify a job
exec dbms_job.change(2, null, sysdate+3, null);
How to Stop a scheduled job.
Article by Divya