使用SQL查看用户所使用的SQL语句

来源:互联网 发布:vs 知乎 编辑:程序博客网 时间:2024/06/07 07:02
select a.user_name, b.sql_text,c.sid,c.serial#,c.status
from v$open_cursor a, v$sqlarea b,v$session c
where
a.address 
= b.address and
a.sid
=c.sid --and c.status='ACTIVE'
order by a.user_name


试一下就知道好处了