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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I get _my_ session id?

Re: How do I get _my_ session id?

From: Helmut Hahn <helmut.hahn_at_bitoek.uni-bayreuth.de>
Date: Tue, 13 Oct 1998 09:26:24 +0200
Message-ID: <3623009F.74FE9E8A@bitoek.uni-bayreuth.de>


Andreas Dunker 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)

You can do a

select SID from sys.gv_$session where USERNAME = User;

Where user is the dbuser of your session. This works if the user has only one session. If not you get more than one SID.

Hope this helps
Helmut Received on Tue Oct 13 1998 - 02:26:24 CDT

Original text of this message

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