Archive for the ‘Map SID to OS PID’ Category

Map SID associated to an OS PID

Monday, April 21st, 2008

Map Oracle database Session ID SID to the corresponding OS PID.



– This script would map SID associated to a given OS PID.
– Jul 2007
– Bobby A.
– map_OS_PID_TO_SID.sql

idbasolutions.com Apr 2008
set linesize 120
column SID format 99999
column status format a8
column osuser format a8
column username format a8
column COMMAND format 999999
column MACHINE format a6
column MODULE format a10
column SCHEMANAME format a5
column action format a8
column LOCKWAIT format a8
column action format a8

select s.sid,p.spid os_pid,s.status, s.osuser,s.username,s.COMMAND,
s.MACHINE,s.MODULE,s.SERIAL#, s.SCHEMANAME, s.LOCKWAIT,s.action
from v$session s, v$process p
WHERE s.paddr = p.addr
and p.spid =’&OS_PID’;




Google