Re: Select Current Session ID ?
Date: Wed, 13 Feb 2008 13:33:58 -0800 (PST)
On Feb 11, 7:27 pm, DA Morgan <damor..._at_psoug.org> wrote:
> fitzjarr..._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
> damor..._at_x.washington.edu (replace x with u to respond)
> Puget Sound Oracle Users Groupwww.psoug.org- Hide quoted text -
> - Show quoted text -
The original question was:
"How I can select *my* current session id (from v$session?) in sqlplus? "
Thus, the OP asked HOW to get the value from the V$SESSION view. I merely responded with a valid query.
David Fitzjarrell Received on Wed Feb 13 2008 - 15:33:58 CST