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: Determining your own session ID

Re: Determining your own session ID

From: Chrysalis <cellis_at_iol.ie>
Date: 1997/04/26
Message-ID: <3361E63F.3466@iol.ie>#1/1

If you simply want the sessionid as a unique number (for example to identify your own rows in a shared work table, the inbuilt function userenv('sessionid') will return it for you in any SQL (or PL/SQL) statement.

Chrysalis.

Tim Witort wrote:
>
> Is there a way to determine your own session ID in
> a SQL*Plus session? The key issue I am dealing with
> is a database where the same username may have many
> sessions, so it is not as simple as getting the session
> ID and serial# from v$session where the username is
> my username, because that may return many rows. I've
> thought about doing a similar select from v$session
> where the COMMAND is a select (since I will be doing
> a select when the data is retrieved), but another
> same-named user may also be doing a select, so that
> only reduces the chances of getting multiple rows back
> but does not eliminate it.
>
> Any ideas?
>
> thanks,
> -- TRW
> --
> |||| remove the underscores in my address to reply ||||
> |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> | Tim Witort || He is not silent. He is not |
> | trw_@_medicalert.org || whispering. We are not quiet |
> | || we are not listening. |
> | Pin: TZ, only one :^( || - Out of the Grey |
> |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Received on Sat Apr 26 1997 - 00:00:00 CDT

Original text of this message

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