Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to identify my session?
On Wed, 5 May 1999, Prabhakar Narayanan wrote:
>
> Issue the following statement to find out your session id
>
> select userenv('sessionid') from dual
That will just give you the AUDSID. To get the value of the session ID, you need to:
select sid from v$session where audsid = userenv('sessionid');
> Brahms Lin wrote:
> >
> > I would like to find some way to identify my Oracle app's session.
> > I know there's a v$session, but don't know which is my current
> > session. I'm trying to generate an unique table name. I think that
> > can be done by prefixing the current session's id to the table name.
Since Session IDs are reused, this is an unreliable way to uniquely name a table.
--
Jeremiah Wilton http://www.wolfenet.com/~jeremiah
Received on Wed May 05 1999 - 10:12:34 CDT