1.查询SID
SELECT * FROM V$ACCESS O WHERE O.OBJECT LIKE 'T2%';
2.根据SID查询SERIAL#
SELECT * FROM V$SESSION A WHERE A.SID=493;
3.根据SID和SERIAL#删除进程
ALTER SYSTEM KILL SESSION '493,3365';
如果执行失败
SQL> ALTER SYSTEM KILL SESSION '493,3365';
ALTER SYSTEM KILL SESSION '493,3365'
*
ERROR at line 1:
ORA-00031: session marked for kill
直接使用SID查询Linux进程进行删除
select spid, osuser, s.program
from v$session s,v$process p
where s.paddr=p.addr and s.sid=493
根据查询到的进程ID执行以下命令
kill -9 spid
再次在Oracle客户端执行
ALTER SYSTEM KILL SESSION '493,3365';
即可