select s.sid, s.serial#, s.username,
to_char(s.logon_time,'DD-MON HH24:MI:SS') logon_time,
p.pid oraclepid, p.spid "ServerPID", s.process "ClientPID",
s.program clientprogram, s.module, s.machine, s.osuser,
s.status, s.last_call_et,sw.EVENT,s.SQL_ADDRESS
from v$session s, v$process p,v$session_wait sw,v$sql sq
where p.spid=nvl('7132',' ')
and s.paddr=p.addr
and sw.SID=s.SID
and sq.ADDRESS=s.SQL_ADDRESS
order by s.sid
to_char(s.logon_time,'DD-MON HH24:MI:SS') logon_time,
p.pid oraclepid, p.spid "ServerPID", s.process "ClientPID",
s.program clientprogram, s.module, s.machine, s.osuser,
s.status, s.last_call_et,sw.EVENT,s.SQL_ADDRESS
from v$session s, v$process p,v$session_wait sw,v$sql sq
where p.spid=nvl('7132',' ')
and s.paddr=p.addr
and sw.SID=s.SID
and sq.ADDRESS=s.SQL_ADDRESS
order by s.sid
Where is 7132 is PID column of top utility output.
select *
from
v$sql s
where s.ADDRESS='xxxxxxxxx'