Disabling all DBMS_SCHEDULER jobs [message #465268] |
Tue, 13 July 2010 06:05 |
tomdavies
Messages: 2 Registered: January 2010 Location: Exeter, UK
|
Junior Member |
|
|
When performing test recoveries of a database we often wish to prevent database jobs from running application processes such as (a) sending emails; or (b) logging events to a central logging database.
In order to accomplish this, we set the job_queue_processes to zero before opening the database.
This means that no dbms_jobs run on the open instance, but it does not prevent dbms_scheduler jobs from running.
How can we prevent any dbms_scheduler jobs from running?
I have looked at setting the MAX_JOB_SLAVE_PROCESSES attribute using DBMS_SCHEDULER.SET_SCHEDULER_ATTRIBUTE, but this cannot be set to zero.
|
|
|
|
Re: Disabling all DBMS_SCHEDULER jobs [message #465299 is a reply to message #465286] |
Tue, 13 July 2010 08:08 |
tomdavies
Messages: 2 Registered: January 2010 Location: Exeter, UK
|
Junior Member |
|
|
Hi Mahesh,
Thanks for the suggestion. We could implement a script that would generate such commands to disable each individual job in each schema, however we're looking for a simple way for all jobs in all schemas to be disabled before the database is opened.
For info, I have received a solution for this from another source. Scheduler (and dbms_jobs) can all be disabled as follows:
exec dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED', 'TRUE');
alter system set job_queue_processes=0;
Cheers,
Tom.
|
|
|
|