|
Oracle Home |
|
Home > Oracle Database Administration (DBA) > Maintenance > Killing an Oracle job at the OS level |
|
Oracle Database 10g Administration (DBA): Maintenance |
|---|
Killing an Oracle job at the OS level |
|
Note: The article ( named Killing an Oracle job at the OS level ) was taken from www.in-oracle.com.
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:
Note: The article ( named Killing an Oracle job at the OS level ) was taken from www.in-oracle.com.
|
|
Home > Oracle Database Administration (DBA) > Maintenance > Killing an Oracle job at the OS level |
|
Different Romanian Links/ Linkuri romanesti diferite |
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. Copyright (c) 2009-2011 Paul Catalin Tomoiu. All rights reserved.