Re: How to derive the process ID of its own session?

From: Peter Teoh <htmldeveloper_at_gmail.com>
Date: Sat, 23 Feb 2008 23:11:04 +0800
Message-ID: <804dabb00802230711k25c1ec43id5ca07f6a0d3fa7@mail.gmail.com>


On Fri, Feb 22, 2008 at 10:32 PM, Powell, Mark D <mark.powell_at_eds.com> wrote:
>
> Note if the complete query that errored with ORA-01427 was something
> like
>
> select paddr from v$session
> where sid = (select sid from v$mystat where rownum = 1)
>
> It can be fixed by adding
> and rownum =1
> as the third line
>
> Normally, if dedicated sessions are used, only one session will exist
> for a specific process however Oracle will use a second session to run
> recursive SQL so you can sometimes get two sessions for a background
> process.
>
> -- Mark D Powell --
> Phone (313) 592-5148
>

Thank you for the answer, it is more surprising than I thought. But the spid I was looking for was the foreground OS process which I thought should not be shared right? Ie, different foreground process using the same background process in a shared server scenario - correct?

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Feb 23 2008 - 09:11:04 CST

Original text of this message