select P.SPID, s.status, S.sid,S.serial#,S.username,S.machine,S.program,S.osuser,to_char(S.logon_time,‘yyyy/mm/dd-hh24:mi:ss‘),s.audsid
from v$process P, v$session S
WHERE P.addr = S.paddr
AND s.audsid = userenv(‘sessionid‘)
--audsid: Auditing session ID
--userenv :返回当前用户环境的信息
例如:
原文地址:http://www.cnblogs.com/yabingshi/p/3817206.html