Re: V$ Views
Date: Tue, 26 May 2009 13:42:28 -0700 (PDT)
Message-ID: <b6c58ea4-e33d-44f5-9c1e-752e29a3e610_at_d25g2000prn.googlegroups.com>
On May 26, 12:58 pm, a..._at_unsu.com wrote:
> Hi,
>
> I'm looking at some Oracle documentation and they are not really clear
> on that the following items are in V$SESSION & V$PROCESS:
>
> V$SESSION - process
> V$PROCESS - pid & spid
>
> They cannot all be server process ID's.......
It becomes a little more clear when you actually check these things on a real system. Remember, Oracle has its process id, while the OS has its own process id, which on some systems may not be a process at all.
Note the PADDR in V$SESSION is an address, which can be used to find the process in V$PROCESS. In there, there is the Oracle process, PID, and the OS process, SPID. The PROCESS column in V$SESSION is the client process, so you may see the "process" for a completely different OS.
1 select sid, process from v$session
2* where rownum < 4
SYS_at_XXXX > /
SID PROCESS
---------- ------------
231 10616 234 10616 235 5684:4476
So here we see there are two Oracle session identifiers with the same unix process, so obviously at least one of them is expired. The one with a colon in it is a client on Windows.
SYS_at_TPRD> select a.sid, a.process, b.pid, b.spid from v$session a, v $process b where a.paddr=b.addr and a.sid in (231,234,235);
SID PROCESS PID SPID
---------- ------------ ---------- ------------
235 5684:4476 206 10436 234 10616 208 10618 231 10616 209 10620
If you were to do a ps -ef (or whatever your local equivalent is) grepping for those processes, you might see children owned by the init process, while others might show that they are local or remote connections.
jg
-- _at_home.com is bogus. http://www3.signonsandiego.com/stories/2009/may/26/1n26texting235813-texting-may-be-taking-toll/?uniontribReceived on Tue May 26 2009 - 15:42:28 CDT