select * from v$sqlarea t where t.PARSING_SCHEMA_NAME in ('用户名') order by t.LAST_ACTIVE_TIME desc。
select * from v$sqlarea t order by t.LAST_ACTIVE_TIME desc 注意 :执行此语句等等一些相关的语句 必须具有DBA 的权限 虽然这条语句很普通 但是需要的时候很管用 能够及时查出一个人执行sql语句情况。 -- -----V$SQLAREA中的LAST_LOAD_TIME和LAST_ACTIVE_TIME LAST_LOAD_TIME DATE Time at which the query plan (heap 6) was loaded into the library cache -- -----oracle 查看已经执行过的sql 这些是存在共享池中的 -- -----查看oracle会话 select * from v$session t order by t.LAST_ACTIVE_TIME desc -- -----查看oracle的权限角色 |