Re: Q: How to obtain SID for my session?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 13 Aug 2001 00:34:09 -0700
Message-ID: <a20d28ee.0108122334.5d78b187_at_posting.google.com>


"Stan Benda" <sbenda_at_uswest.com> wrote in message news:<AVXc7.925$3R1.249122_at_news.uswest.net>...
> Closest I found is
>
> select userenv(sessionid) from dual;
>
> but it is audit ID. I would like to find SID or serial# for v$session
>
> Any idea?
>
> Stan

I always use
select sid, serial#
from v$session
where audsid = userenv('sessionid')

This doesn't work for sys however.

Hth,

Sybrand Bakker, Senior Oracle DBA Received on Mon Aug 13 2001 - 09:34:09 CEST

Original text of this message