Re: Select Current Session ID ?

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 11 Feb 2008 17:27:42 -0800
Message-ID: <1202779624.692425@bubbleator.drizzle.com>


fitzjarrell_at_cox.net wrote:
> On Feb 11, 7:08 am, Cassiano <cassianorol..._at_gmail.com> wrote:

>> Hi
>>
>> How I can select *my* current session id (from v$session?) in sqlplus?
>>
>> Thanks

>
> Apart from using the v$mystat view (available in 9i and later
> releases)
>
> select sid
> from v$session
> where audsid = sys_context('USERENV', 'SESSIONID');
>
> Presuming you have access to the V$SESSION view.
>
>
> David Fitzjarrell

Bad presumption ... most DBAs won't give access to any dynamic performance view to a developer or end-user.

-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Mon Feb 11 2008 - 19:27:42 CST

Original text of this message