Database SID based on OS Process ID
col SPID for a20;
col OSUSER for a30;
col sid format 999999
col username format a20
col osuser format a15
select b.spid,a.sid, a.serial#,a.username, a.osuser
from v$session a, v$process b
where a.paddr= b.addr
and b.spid='&spid'
order by b.spid;
=============================================
col SPID for a20;
col OSUSER for a30;
col sid format 999999
col username format a20
col CLIENTPROGRAM for a20;
col MODULE for a30;
col MACHINE for a30;
select b.spid,a.sid, a.serial#,a.username, a.osuser,
a.PROGRAM clientprogram, a.module, a.machine
from v$session a, v$process b
where a.paddr= b.addr
and b.spid in ='&spid'
order by b.spid;
No comments:
Post a Comment