标签:
1、找到正在执行的存储过程的 sid ,serial#
select b.sid,b.SERIAL#,a.OBJECT, ‘alter system kill session ‘ || ‘‘‘‘ || b.sid || ‘,‘ ||b.SERIAL# || ‘‘‘;‘ kill_command
from SYS.V_$ACCESS a, SYS.V_$session b
where a.type = ‘PROCEDURE‘
and (a.OBJECT like upper(‘%存储过程名%‘) or
a.OBJECT like lower(‘%存储过程名%‘))
and a.sid = b.sid
and b.status = ‘ACTIVE‘;
2、Kill 正在执行的存储过程
alter system kill session ‘sid,SERIAL#‘;
3、查询正在执行的存储过程另外一种方法
select name from v$db_object_cache where locks > 0 and pins > 0 and type=‘PROCEDURE‘;
标签:
原文地址:http://www.cnblogs.com/lcword/p/5498213.html