Wednesday, January 23, 2013

Query to find Session details including Process

select a.sid,a.serial#,substr(a.username,1,10) username,substr(a.osuser,1,10) osuser,b.spid
    a.program,s.module,substr(a.machine,1,22) machine,
    to_char(a.logon_time,'ddMon hh24:mi') login,
    last_call_et "last call",status
from v$session a,v$process b
where a.paddr(+)=b.addr and a.sid='&sid'
order by to_number(b.spid);

No comments:

Post a Comment