oracle查询当前 执行的sql和进程

select a.sid,
       a.serial#,
       c.object_name,
       b.session_id,
       b.oracle_username,
       b.os_user_name,vt.sql_text,a.status 
  from v$process p, v$session a, v$locked_object b, all_objects c,v$sqltext vt
 where p.addr = a.paddr
   and a.process = b.process
   and c.object_id = b.object_id

   and a.sql_hash_value=vt.hash_value and object_name='对象名'

alter system kill session 'SID,serial#';


posted @ 2014-11-05 17:31  饺子吃遍天  阅读(282)  评论(0)    收藏  举报