首页 > 数据库 > Oracle > 快速杀掉Oracle的Session
单位服务器上的Oracle突然出现无法连接的现象,提示进程已经达到了最大的限制,奇怪!在线不过几个人为什么达到了500个进程?肯定是由于程序错误造成大量死进程留在系统中。但是杀掉这些死进程却很麻烦。在网上找了半天终于发现Orakill这个命令!
C:>orakill -help
Usage: orakill sid thread
where sid = the Oracle instance to target
thread = the thread id of the thread to kill
The thread id should be retrieved from the spid column of a query such as:
select spid, osuser, s.program from
v$process p, v$session s where p.addr=s.paddr
这是Orakill的帮助提示,根据此提示,找出所有状态为Inactive的进程session,然后并记下paddr,用上面的语句找出这个session所对应的spid,用orakill sid spid杀掉。
面对一大堆的死进程,只好用批处理的办法进行处理,最终问题解决。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/18966/viewspace-833593/ ,如需转载,请注明出处,否则将追究法律责任。