Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Shanmuga Priya.

Asked: October 19, 2016 - 5:51 am UTC

Last updated: October 19, 2016 - 3:19 pm UTC

Version: 12c

Viewed 1000+ times

You Asked

Hi Tom,
I have a scheduler which is linked to my package. The package was running for long and hence I cancelled the task. Now when I try to run the package back, the scheduler is not running.

I checked in "USER_SCHEDULER_JOB_LOG" AND THE MESG IS

"REASON="ORA-01014: ORACLE shutdown is progress"

and the STATUS is "STOPPED"


My Scheduler code that I used is

BEGIN
DBMS_SCHEDULER.CREATE_JOB
( job_name => 'batch_error',
job_type => 'PLSQL_BLOCK',
start_date => SYSTIMESTAMP,
repeat_interval => 'freq=secondly; interval=10;',
job_action => 'common_pipe_send_receive_pkg.common_pipe_receive_error_proc;',
enabled => true
);
END;
/

Please advise me?

Thank you,
Priya

and Chris said...

Someone shutdown the database while the job was running!

To get it going again, disable and reenable it:

exec dbms_scheduler.disable('BATCH_ERROR');
exec dbms_scheduler.enable('BATCH_ERROR');

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

dbms_scheduler still not working

Shanmuga Priya D, October 19, 2016 - 11:27 am UTC

Hi Chris,
I tried to disable to dbms_scheduler but I get the below error message

Error report:
ORA-27478: job "IRS2_RAW_DIST"."BATCH_ERROR" is running
ORA-06512: at "SYS.DBMS_ISCHED", line 4567
ORA-06512: at "SYS.DBMS_SCHEDULER", line 2920
ORA-06512: at line 1
27478. 00000 - "job \"%s.%s\" is running"
*Cause: An attempt was made to drop a job that is currently running.
*Action: Stop the job and then reissue the command, or reissue the command
specifying the force option to stop the job first.
Chris Saxon
October 19, 2016 - 12:42 pm UTC

Then the job is still running!

Dbms_scheduler is still not working

Shanmuga Priya D, October 19, 2016 - 11:32 am UTC

I tried to query on user_scheduler_job_log view

here

operation is RUN
Status is STOPPED
Chris Saxon
October 19, 2016 - 12:43 pm UTC

That means that run was aborted for some reason.

What exactly are you doing? Show us all your code!

A reader, October 19, 2016 - 3:09 pm UTC

I think you can use operation system command to kill the process with job first ...
Chris Saxon
October 19, 2016 - 3:19 pm UTC

I'd start with killing the session if that's necessary. I'm not sure exactly what the problem is though...

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library