DBMS_SCHEDULER [message #672464] |
Tue, 16 October 2018 05:46 |
chat2raj.s
Messages: 163 Registered: October 2010 Location: Chennai, India
|
Senior Member |
|
|
Am trying oracle scheduled jobs for the first time and I can see my scheduled job state as RUNNING from user_scheduler_jobs. It is taking more than a day now and which should not be. How can i know why there is a delay of so much time.
Also i need to stop this job now, but system says the job is not running.
EXEC DBMS_SCHEDULER.STOP_JOB('JOB01', FORCE=>TRUE);
|
|
|
|
Re: DBMS_SCHEDULER [message #672479 is a reply to message #672467] |
Tue, 16 October 2018 06:43 |
chat2raj.s
Messages: 163 Registered: October 2010 Location: Chennai, India
|
Senior Member |
|
|
SQL> SELECT job_name,enabled,state,restartable,start_date, end_date, Nvl(end_date,SYSDATE)-start_date Running_time FROM user_scheduler_jobs;
JOB_NAME ,ENABLED ,STATE ,RESTARTABL,START_DATE ,END_DATE ,RUNNING_TIME
----------,----------,----------,----------,--------------------,--------------------,------------
JOB01 ,TRUE ,RUNNING ,FALSE ,15-OCT-18 02.18.33 , ,23:11:05
SQL> EXEC DBMS_SCHEDULER.STOP_JOB('JOB01', FORCE=>TRUE);
BEGIN DBMS_SCHEDULER.STOP_JOB('JOB01', FORCE=>TRUE); END;
*
ERROR at line 1:
ORA-27366: job "CTCORG.JOB01" is not running
ORA-06512: at "SYS.DBMS_ISCHED", line 210
ORA-06512: at "SYS.DBMS_SCHEDULER", line 557
ORA-06512: at line 1
|
|
|
Re: DBMS_SCHEDULER [message #672484 is a reply to message #672479] |
Tue, 16 October 2018 07:15 |
Bill B
Messages: 1971 Registered: December 2004
|
Senior Member |
|
|
use of the force option, which kills the job slave, requires the MANAGE SCHEDULAR priviledge and can't be issued by run of the mill users. Using the
EXEC DBMS_SCHEDULER.STOP_JOB('JOB01');
will do the equivalent of issuing a ctrl-c to the job and will not do a hard abort.
|
|
|
Re: DBMS_SCHEDULER [message #672485 is a reply to message #672479] |
Tue, 16 October 2018 07:23 |
John Watson
Messages: 8951 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
You may have a zombie job. You can't kill it because it is already dead. I think there are a few bugs that can cause this, better look on Metalink or raise a TAR.
|
|
|
Re: DBMS_SCHEDULER [message #673623 is a reply to message #672485] |
Tue, 27 November 2018 23:21 |
chat2raj.s
Messages: 163 Registered: October 2010 Location: Chennai, India
|
Senior Member |
|
|
Yes that was a zombie job and my dba helped to kill it. Thank you John and Bill. Apology for being late to reply.
|
|
|