 |
|
Oracle Tips by Burleson |
Chapter 1 -
Overview of Oracle Job Scheduling
Migrating from dbms_job to
dbms_scheduler
-- New scheduler.
BEGIN
DBMS_SCHEDULER.create_job (
job_name
=> 'dummy_job',
job_type
=> 'PLSQL_BLOCK',
job_action => 'BEGIN NULL; /* Do Nothing */ END;',
start_date => SYSTIMESTAMP,
repeat_interval => 'SYSTIMESTAMP + 1 /* 1 Day */');
END;
/
By comparing these examples, it is noted that
conversion of basic jobs is quite simple, involving the following
steps:
-
Define a meaningful job_name for the
new job.
-
Assign a job_action of PLSQL_BLOCK.
-
Use the what value from the old job
as the job_action value in the new job.
-
Use SYSTIMESTAMP for the start_date
value.
-
Use the interval value from the old
job as the repeat_interval value in the new job, making
sure the result of the expression is a TIMESTAMP not a DATE.
Once this conversion has been completed for all
jobs, there is freedom from using the old scheduler, so the
job_queue_processes parameter can now be set to zero.
|
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|