Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I get _my_ session id?
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