garden1.jpg

Find database active sessions in Oracle, take note of the OS PID and use this code here to Map SID associated to an 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’;

Latest Blog Items

email

Thank you for your interest in idbasolutions.

Contact us using this email: contact.us@idbasolutions.com