根据OS进程号(我这里用的直连方式),应该可以查到它正在执行什么SQL语句.
-- 查到oracle OS进程的sid编号:
select ses.sid from v$session ses,v$process pro where pro.spid=&spid and ses.paddr=pro.addr;
-- 查到此sid连接用户正在执行的SQL语句:
select sql_text from v$sqltext_with_newlines where (hash_value,address)
in (select sql_hash_value,sql_address from v$session where sid=&sid) order by address,piece;
阅读(1023) | 评论(0) | 转发(0) |