ORACLE查询当前连接的用户信息及操作的SQL语句
ORACLE--查询当前连接的用户信息及操作的SQL语句
select sid,
status,
v$session.username 用户名,
last_call_et 持续时间,
status 状态,
LOCKWAIT 等待锁,
machine 用户电脑名,
logon_time 开始登入时间,
sql_text,OSUSER,v$session.program
from v$session, v$process, v$sqlarea
where paddr = addr
and v$session.username is not null
order by last_call_et desc;