How to get the SID, SPID, USERNAME, TERMINAL & Application from oracle database
The SID, SPID, USERNAME, TERMINAL & Application query :
select
s.sid, p.spid, substr(s.username,1,20) username, s.terminal, p.Program
from
v$session s, v$process p
where
s.paddr = p.addr
and
s.sid = (select sid from v$mystat where rownum=1)
;