Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle Scheduler is not running jobs

2796685Dec 1 2017 — edited Dec 7 2017

Hi,

I setup a simple scheduler job with simple insert in a anonymous PLSQL block with below create job procedure.   I queried dba_scheduler_jobs view and confirm job created and enabled. However, it didn't run as per schedule after job created.

DBMS_SCHEDULER.CREATE_JOB (

   job_name           =>  'TestJob1',

   job_type           =>  'PLSQL_BLOCK',

   job_action         =>  '

   BEGIN

   INSERT

INTO SCOTT.T1_TEST

  (

    A,

    B,

    ADDED_BY,

    ADDED_DATE

  )

  VALUES

  (

    2,

    ''TWO'',

    463002,

    SYSDATE

  );

  END;

  ',

   start_date         =>  TO_DATE('30-NOV-2017 13:00:00','DD-MON-YYYY HH24:MI:SS'),

   repeat_interval    => 'FREQ=MINUTELY; INTERVAL=30;', /* every other day */

   end_date           =>  TO_DATE('10-DEC-2017 14:00:00','DD-MON-YYYY HH24:MI:SS'),

   auto_drop          =>   FALSE,

   job_class          =>  'DEFAULT_JOB_CLASS',

   comments           =>  'My new job',

   ENABLED => TRUE

   );

when I run the job with below command; it works fine and row inserted into table .

BEGIN

  DBMS_SCHEDULER.RUN_JOB(

    JOB_NAME            => 'TESTJOB1',

    USE_CURRENT_SESSION => TRUE);

END;

/

when I run the job with below command; it doesn't work. it fails with error. Can you please share some ideas how to resolve this issue and run jobs thru scheduler. your help greatly appreciated.

BEGIN

  DBMS_SCHEDULER.RUN_JOB(

    JOB_NAME            => 'TESTJOB1',

    USE_CURRENT_SESSION => FALSE);

END;

/

ORA-27492: unable to run job "SCOTT"."TESTJOB1": scheduler unavailable

ORA-06512: at "SYS.DBMS_ISCHED", line 209

ORA-06512: at "SYS.DBMS_SCHEDULER", line 594

ORA-06512: at line 2

27492.0000 -  "unable to run job \"%s\".\"%s\": 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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2018
Added on Dec 1 2017
3 comments
17,781 views