如何彻底杀死Oracle会话
2006-08-08 12:56
405 查看
当你觉得一个长时间运行的一个PL/SQL,有问题时需要立即中止,怎么办:有两种方法:
1.执行 alter system kill session 'sid,serial#'
这里的sid,serial# 可以在V$Session中找到。执行这个命令,有时候不一定有效。而且看起来杀掉了,
但是使用的相关资源,也不一定被释放了。那么这时候就要用到下面这种方法了:
2.操作系统级的命令OraKill
这个命令是Oracle自带的命令,在Oracle_Home的bin目录下。
执行不带任何参数的OraKill, 会给出下面的提示:
Usage: orakill sid thread
where sid = the Oracle instance ID 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
这个命令瞬间会把相关的进程杀掉,所以使用的时候一定要小心。
相关的文章,请参见http://www.eygle.com/faq/Kill_Session.htm
1.执行 alter system kill session 'sid,serial#'
这里的sid,serial# 可以在V$Session中找到。执行这个命令,有时候不一定有效。而且看起来杀掉了,
但是使用的相关资源,也不一定被释放了。那么这时候就要用到下面这种方法了:
2.操作系统级的命令OraKill
这个命令是Oracle自带的命令,在Oracle_Home的bin目录下。
执行不带任何参数的OraKill, 会给出下面的提示:
Usage: orakill sid thread
where sid = the Oracle instance ID 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
这个命令瞬间会把相关的进程杀掉,所以使用的时候一定要小心。
相关的文章,请参见http://www.eygle.com/faq/Kill_Session.htm
相关文章推荐
- 如何彻底删除Oracle?
- 谈谈如何彻底卸载Oracle?
- 如何彻底卸载Oracle?
- 如何彻底卸载Oracle
- Oracle:彻底结束会话 ,彻底解锁
- 如何杀死一个已经detached的screen会话?
- 【Kill】两条Linux命令彻底杀死Oracle
- NT下如何彻底删除Oracle
- 如何彻底删除Oracle (转)
- Oracle如何查询当前会话的sid
- NT下如何彻底删除Oracle?
- 如何杀死oracle死锁进程
- 如何杀死oracle死锁进程
- Windows下如何彻底删除Oracle
- 如何彻底卸载oracle
- Oracle HowTo:如何快速杀死占用过多资源(CPU,内存)的数据库进程
- 如何杀死oracle死锁进程
- 如何彻底删除Oracle
- 两条Linux命令彻底杀死Oracle
- NT下如何彻底删除Oracle