oralce session 无法kill

/*
查看当前或最近执行的sql
*/
select sa.SID,
       sa.SERIAL#,
       sa.USERNAME,
       sa.LOCKWAIT,
       qa.SQL_FULLTEXT,
       ta.STATUS,
       ta.RECURSIVE,
       ta.USED_UREC,
       ta.LOG_IO,
       ta.PHY_IO,
       ta.CR_GET,
       ta.CR_CHANGE
from v$session sa,v$transaction ta,v$sqlarea qa
where sa.SADDR = ta.SES_ADDR and (sa.SQL_ID = qa.SQL_ID or sa.PREV_SQL_ID = qa.SQL_ID)
and sa.TYPE = 'USER';

 

 

1、杀掉session

alter system kill session '164,32851';

 

2、如果还是无法删除,查出进程号

select p.*,spid, osuser, s.program
from v$session s,v$process p
where s.paddr=p.addr and s.sid=164

3、登录到oracle 后台

 

ps -ef | grep oracle //查出所有的oracle进程

 

4、kill -9  12805 (对应的进程号)

 

 

你可能感兴趣的:(oracle,sql,session,IO,kill,System)