如何终止正在运行的 Oracle 程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12422113/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 04:29:31  来源:igfitidea点击:

How to terminate Oracle procedures which is running

oraclestored-procedures

提问by Andromeda

I created an oracle procedure. When i execute it from sqldevoloper in some case i think it is going into an infinite loop. It keeps on generating the log files. How can i terminate this running procedure? I stopped the oracle service through services.msc . When i start it again , log files are getting generated. I think still that procedure is running. How can i terminate those procedures.

我创建了一个oracle程序。在某些情况下,当我从 sqldevoloper 执行它时,我认为它会进入无限循环。它不断生成日志文件。我怎样才能终止这个正在运行的程序?我通过 services.msc 停止了 oracle 服务。当我再次启动它时,正在生成日志文件。我认为该程序仍在运行。我怎样才能终止这些程序。

回答by vikiiii

Identify your session (hung) from v$session using

使用 v$session 识别您的会话(挂起)

select sid, serial#, status from v$session where USERNAME='NAME';

And then kill it using

然后使用杀死它

ALTER SYSTEM KILL SESSION 'SID,#SERIAL';

回答by BigMike

ALTER SYSTEM KILL SESSION 

But you have to retrieve session id and have rights.

但是您必须检索会话 ID 并拥有权限。