Identify OS process ID based on database SID
select a.sid, a.serial#,a.username, a.osuser, b.spid
from v$session a, v$process b
where a.paddr= b.addr
and a.sid='&sid'
order by a.sid;
How to find out PID using SID
select pid, sid
from v$process, v$session
where v$process.addr = v$session.paddr
and sid = ###;
How to find "sql_text" using SID
select
a.sid,
a.serial#,
b.sql_text
from
v$session a,
v$sqlarea b
where
a.sql_address=b.address
and
sid= ###;
----Nikhil Tatineni----
----Oracle in memory----