转自:http://levicorp.com/2009/05/22/how-to-kill-the-running-job/
1. Check the running Job (From here you will get the SID thatrunning the Job)
SQL> SELECT * FROM DBA_JOBS_RUNNING;
2. Make Job become Broken/offline
BEGIN SYS.DBMS_IJOB.BROKEN(job#,TRUE); END;SQL> BEGIN SYS.DBMS_IJOB.BROKEN('136451',TRUE); END;
3. Kill the Oracle’s Session
SQL> ALTER SYSTEM KILL SESSION 'sid,serial#';
4. Kill the O/S Process ID (PID)(一般完成该步骤即可)
SELECT p.spid FROM v$session s, v$process pWHERE s.paddr = p.addrAND s.sid = :sid; For Windows, at the DOS Prompt: orakill sid spidFor UNIX at the command line> kill '9 spidUssually Oracle Job running with Process Name : ora_j00%
5. Check if the Job is Still Running
SQL> SELECT * FROM DBA_JOBS_RUNNING;
6. Determine the Current Number of Job Queue Processes
SQL> col value for a10SQL> select name,value from v$parameter where name = 'job_queue_processes';
7. Alter the Job Queue to Zero
SQL> ALTER SYSTEM SET job_queue_processes = 0;This will bring down the entire job queue processes.
8. Validate that No Processes are Using the Job Queue
SQL> SELECT * FROM DBA_JOBS_RUNNING;
9. Mark the DBMS_JOB as Not Broken
BEGIN SYS.DBMS_IJOB.BROKEN(job#,FALSE); END;
10. Alter the Job Queue to Original Value
SQL> ALTER SYSTEM SET job_queue_processes = original_value;
分享到:
相关推荐
How-to-Make-a-Computer-Operating-System, 在 C 中,如何制作计算机操作系统 如何使计算机操作系统关于如何从头开始编写 C/C 操作系统的在线书籍。注意 : 这个存储库是我旧课程的一个。 我的第一个项目是我在高中时...
how-to-write-a-great-research-paper-wiley-keys-to-success.pdf
how-to-be-a-programmer-zh
李开复展示:How-to-Presentation
「漏洞分析」cxo-f03-business-executive-fundamentals-how-to-beat-the-mbas-at-their-own-game_finalpptx - 风险评估 安全热点 安全教育 NGFW web安全 信息安全
how-to-read-a-paper教你怎样有效地阅读一篇科技文献
how-to-npm, 模块,教你如何模块 how-to-npm 模块,教你如何模块。先决条件要使用这个项目,你需要 NodeJS 。 访问 http://www.nodejs.org 下载并了解更多信息 !用法npm i -g how-to-npm
The industry’s most focused SharePoint resource, SharePoint 2010 How-To provides all the answers you need—now! Fast, Accurate, and Easy to Use! * Quickly review essential SharePoint ...
How-to-Use-SAMA5D2-GPIO-Under-Linux-00003293a.pdf
Bioinformatics-with-Python-Cookbook-Learn-how-to-use-modern-Python-bioinformatics-libraries-and-applications-to-do-cutting-edge-research-in-computational-biology.pdf
The Executive’s How-To Guide to Automation: Mastering AI and Algorithm-Driven Business By 作者: George E. Danner ISBN-10 书号: 3319997882 ISBN-13 书号: 9783319997889 Edition 版本: 1st ed. 2019 出版...
how-to-create-devoted-customers1146
how-to-improve-your-website-performance.html
Brandstetter-insecurity-In-Building-Automation-How-To-Create-Dark-Buildings-With-Light-Speed-wp
Algorithm-How-to-Solve-it-by-Computer-R-G-Dromey.zip,如何用计算机求解-r.g.dromey解,算法是为计算机程序高效、彻底地完成任务而创建的一组详细的准则。
us-17-Brandstetter-insecurity-In-Building-Automation-How-To-Create-Dark-Buildings-With-Light-Speed-wp
藏经阁-SS7-Attacker-Heaven-Turns-Into-Riot-How-To-Make-Nation-State-And-Intelligence-Attackers-Lives-Much-Harder-On-Mobile-Networks.pdf