select t.USERNAME,t.sid,t.SERIAL#,trunc((sysdate - t.LOGON_TIME) * 24 * 60) time,t.PROGRAM,s.SQL_TEXT,t.sql_id
from v$session t,v$sqlarea s
where t.STATUS = 'ACTIVE'
and (sysdate - t.LOGON_TIME) * 24 * 60 > 10
and t.sql_id is not null
and t.USERNAME is not null
and t.USERname not in ('SYS','SYSTEM')
and t.sql_id = s.SQL_ID
order by time desc ;
阅读(3086) | 评论(0) | 转发(0) |