Oracle层:12345select * from v$db_object_cache where locks > 0 and pins > 0 and type='PROCEDURE';select b.sid,b.SERIAL# from SYS.V_$ACCESS a, SYS.V_$session b where a.type = 'PROCEDURE' and (a.OBJECT like upper('%xxx%') or a.OBJECT like lower('%xxx%')) and a.sid = b.sid and b.status = 'ACTIVE';alter system kill session 'sid,SERIAL';
OS层:123SELECT P.SPID, S.SID, S.SERIAL#, S.USERNAME, S.PROGRAM FROM V$PROCESS P, V$SESSION S WHERE P.ADDR=S.PADDR AND S.STATUS='KILLED';kill –9 $SPID