Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Current session information without parallel processes

Current session information without parallel processes

From: Jesse, Rich <Rich.Jesse_at_quadtechworld.com>
Date: Thu, 26 Aug 2004 14:09:15 -0500
Message-ID: <FBE1FCA40ECAD41180400050DA2BC54004E93CD1@qtiexch2.qgraph.com>


Hey all,
On Oracle 9.2.0.5.0 on HP/UX 11.11, I've written a package for the devs to do their own 10046 tracing (since they don't have access to $ORACLE_HOME/udump). However, as I'm trying to run it, it's blowing up because multiple rows are returned from:

SELECT vp.spid
FROM v$session vs, v$process vp
WHERE vs.paddr = vp.addr

        AND vs.audsid = sys_context('USERENV','SESSIONID');

When I looked into this, it looks like the four parallel processes are now attached to my process. Thinking I was doing this query "wrong", I found MetaLink article 1020001.6, which does the same thing as my original query. After some more searching and some extrapolation, I coded this:

SELECT vp.spid
FROM v$session vs, v$process vp, v$px_session vx WHERE vs.paddr = vp.addr

        AND vs.audsid = sys_context('USERENV','SESSIONID')
        AND vs.saddr = vx.saddr(+)
        AND vx.qcserial# IS NULL;

It works fine, but I don't know how reliable this is. Will qcserial# always be NULL for the process controlling the parallels? How do other folks do this?

TIA,
Rich

Rich Jesse                        System/Database Administrator
rich.jesse_at_quadtechworld.com      QuadTech, Sussex, WI USA





----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Thu Aug 26 2004 - 14:10:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US