Scheduler

How to Resolve ORA-27492: unable to run job: scheduler unavailable

Error ORA-27492

Found error ORA-27492 when executed a tuning job.

BEGIN
  SYS.DBMS_SCHEDULER.RUN_JOB
    (job_name             => 'SYS.SQLTUNE_JOB_61535_2043'
    ,use_current_session  => FALSE);
END;
Error at line 2
ORA-27492: unable to run job "SYS"."SQLTUNE_JOB_61535_2043": scheduler unavailable
ORA-06512: in "SYS.DBMS_ISCHED", line 209
ORA-06512: in "SYS.DBMS_SCHEDULER", line 594
ORA-06512: in line 2

Let’s see the number of jobs that the database can run.

SQL> show parameter job_queue_processes;

NAME                                 TYPE
------------------------------------ ---------------------------------
VALUE
------------------------------
job_queue_processes                  integer
0

Oh, there’s none. Someone turned it off.

Solutions

The required actions are just like the content of ORA-27492 below.

Description

ORA-27492: unable to run job “string”.”string”: scheduler unavailable

Cause

A job run with current session set to false can not be issued if the scheduler is not active. Check value of job_queue_processes parameter, issue dbms_ijob.set_enabled(true), database is in upgrade/migrade mode, database is in data guard mode, or scheduler attribute SCHEDULER_DISABLED is set to TRUE

Action

Run the job in the current session or activate the scheduler

Let’s start some job process for the database.

SQL> alter system set job_queue_processes=100 scope=both;

System altered.

If your job is still not working, you may need to enable scheduler as well.

SQL> exec dbms_scheduler.set_scheduler_attribute ( 'SCHEDULER_DISABLED', 'FALSE' );

Either way should make it work.

Leave a Reply

Your email address will not be published. Required fields are marked *