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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to identify my session?

Re: How to identify my session?

From: Jeremiah Wilton <jeremiah_at_wolfenet.com>
Date: Wed, 5 May 1999 08:12:34 -0700
Message-ID: <Pine.OSF.4.02.9905050809480.18666-100000@gonzo.wolfenet.com>


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

Original text of this message

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