Get ospid from sid
set lines 150 col username for a15 col osuser for a10 col machine for a15 col program for a20 select b.spid, a.username, a.program, a.osuser, a.machine, a.sid, a.serial#, a.status from gv$session a, gv$process b where addr=paddr(+) and sid=&sid;
Get sid from ospid
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;
0 留言