Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Determining your own session ID
Tim Witort wrote:
>
> Is there a way to determine your own session ID in
> a SQL*Plus session?
From: Chrysalis <cellis_at_iol.ie>
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.
I would like to add the the sid returned by userenv is the audsid column in v$session and as such can be used by the active session to obtain current session information from v$process, v$session_io, v$transaction etc....
Mark Powell -- The only advise that counts is the advise that you follow so follow your own advise Received on Mon Apr 28 1997 - 00:00:00 CDT