The following query will help us match a Oracle session ID to a server process ID. You can either use the Oracle SID to find the server process or visa versa.
select s.sid, s.serial#, p.pid orapid, p.spid srvpid, p.pname, p.username
from v$session s, v$process p
where p.addr = s.paddr
and s.sid = ### -- oracle sid
--and p.spid = #### -- server pid
If using Oracle apps, If the session belongs to apps user, we can find out the PID for the SID.
select pid, sid
from v$process, v$session
where v$process.addr = v$session.paddr
and sid = ###;
***************************
keyword sid pid lock spid
***************************
No comments:
Post a Comment