select object_name as 对象名称,
s.sid,
s.serial#,
p.spid as 系统进程号,
'ALTER SYSTEM KILL SESSION ''' || S.SID || ', ' || S.SERIAL# ||
''';' AS KILL_COMMAND,
s.USERNAME,
s.MACHINE,
s.PREV_EXEC_START
from v$locked_object l, dba_objects o, v$session s, v$process p
where l.object_id = o.object_id
and l.session_id = s.sid
--and object_name in('bdc_djzb','bdc_bdcdj','bdc_dydj','bdc_ygdj','bdc_cfdj','wfprocess')
and s.paddr = p.addr
order by s.PREV_EXEC_START;
执行KILL_COMMAND里面的即可kill掉