Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I get _my_ session id?
A copy of this was sent to ADunker_at_picture-safe.de (Andreas Dunker)
(if that email address didn't require changing)
On Thu, 08 Oct 1998 15:34:56 GMT, you wrote:
>Hi *,
>
>how do I get the session id of the current connection;
>for example in sqlplus
>
>select something from someviewortable;
>
>Andreas
>
>--------------------------------------------------
>Andreas Dunker 2B || ! 2B
>adunker_at_picture-safe.de (W. Shakespeare)
select userenv('sessionid') from dual
will give you the audsid column of your record in the v$session table. So you could
select * from V$session where audsid=userenv('sessionid')
to get all of your sessions information...
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
--
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu Oct 08 1998 - 11:45:33 CDT