sql 查询服务器执行的状态

select sid,
       v$session.username 用户名,
       last_call_et 持续时间,
       status 状态,
       LOCKWAIT 等待锁,
       machine 用户电脑名,
       logon_time 开始登入时间,
       sql_text
  from v$session, v$process, v$sqlarea
 where paddr = addr
   and sql_hash_value = hash_value
   and v$session.username = 'WAP'
   and status = 'ACTIVE'
   and v$session.username is not null
 order by last_call_et desc;

你可能感兴趣的:(sql)