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

Home -> Community -> Usenet -> c.d.o.server -> Re: what query to ID the specific DBMS session?

Re: what query to ID the specific DBMS session?

From: <joeNOSPAM_at_BEA.com>
Date: 2 May 2007 15:33:25 -0700
Message-ID: <1178145205.820935.185310@h2g2000hsg.googlegroups.com>


On May 2, 1:46 pm, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:
> On May 2, 3:37 pm, "joeNOS..._at_BEA.com" <joe.weinst..._at_gmail.com>
> wrote:
>
>
>
> > On May 2, 1:19 pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
>
> > > "joeNOS..._at_BEA.com" <joe.weinst..._at_gmail.com> a écrit dans le message de news:
> > > 1178136264.220504.27..._at_c35g2000hsg.googlegroups.com...
> > > | Hi all,
> > > | This is a real basic Oracle ignorance of mine... What query can I
> > > | run
> > > | to get the unique ID of the current DBMS session, so if there's 100
> > > | sessions, all logged in as scott/tiger, each one has it's own > > > | different
> > > | ID?
> > > | thanks
> > > | Joe Weinstein at BEA Systems
> > > |
>
> > > v$session
>
> > > Regards
> > > Michel Cadot
>
> > Thanks. "select * from v$session" gives many rows.
> > What qualifier should I give to get only the row
> > corresponding to my session?- Hide quoted text -
>
> > - Show quoted text -
>
> Use:
>
> select SYS_CONTEXT('USERENV','SID')
> from dual;
>
> You might also want to read up on SYS_CONTEXT and see what else it can
> report.
>
> David Fitzjarrell

thanks! I have tried "select SYS_CONTEXT('USERENV','SESSIONID') from dual"
and it seems to work. I am not clear on the difference between SID and SESSIONID... Received on Wed May 02 2007 - 17:33:25 CDT

Original text of this message

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