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: <fitzjarrell_at_cox.net>
Date: 2 May 2007 13:46:17 -0700
Message-ID: <1178138777.824321.320390@q75g2000hsh.googlegroups.com>


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 Received on Wed May 02 2007 - 15:46:17 CDT

Original text of this message

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