Home » RDBMS Server » Server Administration » Disabling all DBMS_SCHEDULER jobs (10.2.0.1)
icon5.gif  Disabling all DBMS_SCHEDULER jobs [message #465268] Tue, 13 July 2010 06:05 Go to next message
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 #465286 is a reply to message #465268] Tue, 13 July 2010 07:07 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Why not just disable the job?

DBMS_SCHEDULER.DISABLE('yourJob')

Re: Disabling all DBMS_SCHEDULER jobs [message #465299 is a reply to message #465286] Tue, 13 July 2010 08:08 Go to previous messageGo to next message
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.
Re: Disabling all DBMS_SCHEDULER jobs [message #465300 is a reply to message #465299] Tue, 13 July 2010 08:11 Go to previous message
Michel Cadot
Messages: 68653
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Thanks for the feedback.

Regards
Michel
Previous Topic: alert log for ASM
Next Topic: error in shutting down the dB
Goto Forum:
  


Current Time: Sun May 19 15:37:56 CDT 2024