| In Oracle : Kill an Oracle process / job from OS (Linux, AIX, UNIX) | |||
|
|
|||
| |||
|
|
|||
|
In-Oracle.com -> Oracle DBA -> Oracle Maintenance Tasks -> Kill an Oracle process / job from OS (Linux, AIX, UNIX)
Kill an Oracle process / jobs from OS (Linux, AIX, UNIX)
Here are the steps for killing a particular Oracle job at the OS level :
1. Find the job we what to kill and the session associated with the job
select j.sid,s .spid,s .serial#,j .log_user,j .job,j .broken,j .failures,j .last_date||':'||j.last_sec last_date,j .this_date||':'||j.this_sec this_date,j .next_date||':'||j.next_sec next_date,j .next_date - j.last_date interval,j .whatfrom ( select djr.SID, dj.LOG_USER, dj.JOB, dj.BROKEN, dj.FAILURES,dj .LAST_DATE, dj.LAST_SEC, dj.THIS_DATE, dj.THIS_SEC,dj .NEXT_DATE, dj.NEXT_SEC, dj.INTERVAL, dj.WHAT from dba_jobs dj, dba_jobs_running djr where dj.job = djr.job ) j, (select p.spid, s.sid, s.serial# from v$process p, v$session s where p.addr = s.paddr ) swhere j.sid = s.sid;
begin DBMS_JOB .BROKEN(job#,TRUE); commit;end;
NOTE: After executing this command the job is still running.
ALTER SYSTEM KILL SESSION 'sid, serial#';
NOTE: In many situations the session is marked 'KILLED' but is not killed.
For UNIX:
In-Oracle.com -> Oracle DBA -> Oracle Maintenance Tasks -> Kill an Oracle process / job from OS (Linux, AIX, UNIX) |
||
|
|||
|
|
Find related information on Google:
Custom Search
|
Copyright (c) 2011-2012 www.in-oracle.com | Disclaimer: The views expressed on this web site are my own and do not reflect the views of Oracle Corporation. You may use the information from this site only at your risk.