HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How to prevent scheduler jobs from running at instance startup

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
schedulerpreventinstancejobsrunninghowfromstartup

Problem

I'm currently testing Oracle 11g restore procedures from RMAN backups. I can restore instances to another host, but problem I'm having is that as soon as I open the restored instance, scheduler jobs start immediately.

I can disable scheduler by running:

exec dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED','TRUE');


But I can't do this until after instance has started.

Is there a way to disable jobs before starting up the instance?

Solution

It depends on the exact version. From 11gR2 we can use job_queue_processes = 0 to prevent any job from running.

Before 11gR2 you could use services for that. To use services make the job classes that you want to use depend from a service that is controlled using the instance parameters and leave it out when starting the service.

Context

StackExchange Database Administrators Q#55284, answer score: 2

Revisions (0)

No revisions yet.