Is there a way to disable dbms_scheduler_jobs from running after instance startup?
We have a requirements to have a static copy of the database after restoring from backup however if the scheduler has missed its slot, it starts the job after the instance has started up regardless of what time the job is scheduled for.
Can anyone help me?
in 11gR2 you can set job_queue_processes = 0.
In other releases you can try to tie your job_classes to service names and make sure that at startup those service[s] are disabled.
I am aware of the options mentioned however is there a parameter that I can edit before the instance starts up?
The moment the instance starts up, jobs will run if they missed the scheduled start time.
Is there an option i can run in mount mode?
I have found a solution that works on 10g, the actions that needs to be taken before restoring an instance for a test is:
1) set job_queue_processes=0 in pfile \ spfile
2) After opening the database using resetlogs, run the following immediately as sysdba:
Query to see if scheduler is disabled:
SELECT * FROM dba_scheduler_global_attribute;
SCHEDULER_DISABLED should = TRUE
To re-enable Scheduler:
1) set job_queue_processes=10 in pfile \ spfile
2) EXEC dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED','FALSE');
Edited by: babulmiah82 on 27-Mar-2013 01:47