How to derive the process ID of its own session?
From: Peter Teoh <htmldeveloper_at_gmail.com>
Date: Fri, 22 Feb 2008 13:40:00 +0800
Message-ID: <804dabb00802212140s296fd8e5o22c8fdc1609be88c@mail.gmail.com>
Date: Fri, 22 Feb 2008 13:40:00 +0800
Message-ID: <804dabb00802212140s296fd8e5o22c8fdc1609be88c@mail.gmail.com>
Requirements:
How to derive the OS process ID of its OWN Oracle session? Assumption is that we have access to V$PROCESS.
In 10g, I solved it this way:
From userenv('PID') this get mapped to the PID field of V$PROCESS. So I just derived the OS process ID (which is in the V$PROCESS.SPID field) by searching through V$Process for the corresponding USERENV('PID'). But in 9iR2, userenv('PID') is not a valid parameter. So what is the equivalent parameter to be passed to userenv()?
Thank you very much.
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Feb 21 2008 - 23:40:00 CST