p.program
from v$session s, v$process p
where addr = paddr and (spid like
'%&&OSID%' or process like '%&OSID%');
or
select * from v$session where paddr in (select addr from v$process where spid =&OS_PID);
or
select p.spid,s.action,s.sid,s.
from V$process p,V$session s
where s.paddr = p.addr and s.status = 'ACTIVE' and s.username not like '%SYS%'
AND SPID=&OS_PID;
or
-- show PROCESS id for all the active sessions
select p.spid,s.action,s.sid,s.
from V$process p,V$session s
where s.paddr = p.addr and s.status = 'ACTIVE' and s.username not like '%SYS%'
--AND SPID=&OS_PID;
1 comment:
Great, I wanted to check SID from PID and finally get it.
Post a Comment