Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: HELP: How to stop a dbms job gracefully

Re: HELP: How to stop a dbms job gracefully

From: Sridhar Subramaniam <avion_at_ozemail.com.au>
Date: 1996/11/11
Message-ID: <32871C34.2BCB@ozemail.com.au>#1/1

Xuewei Zhou wrote:
>
> We have a problem with one of the jobs scheduled to run periodically
> using DBMS_JOB packages. It shows up in dba_jobs_running but it is not
> doing anything. We had to shutdown and restart the database to have
> this job working again. If you know how to stop a running job, please
> help. We are looking for a short term solution that can stop a hung job
> and run it again at the next interval without shuting down the database
> while we are working on the long term solution.
>
> Thanks.
>
> LuHuaron_at_usa.redcross.org

Every job establishes a session. Identify the session in the v$session and kill it. Maybe, the job is waiting for some locks to be released. Run server manager to identify these. As for locks taken by the job itself, these can be identified by querying the v$lock table for lock_mode = 'JQ'. ( digressed a bit ).

dbms_job.remove( job_no ) will probably not do the trick in killing the job. You can break it by dbms_job.broken( job_no, true ) and checking whats going wrong and reactivating it at a later stage.

-- 
Cheers

Sridhar Subramaniam
Avion Consulting Services
Sydney - Australia
Email : avion_at_ozemail.com.au

Disclaimer : All opinions are truly and just mine.
Received on Mon Nov 11 1996 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US