Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: what query to ID the specific DBMS session?
joeNOSPAM_at_BEA.com wrote:
> 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
SELECT DISTINCT sid
FROM gv$mystat;
or
SELECT sys_context('USERENV', 'SID')
FROM dual;
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Wed May 02 2007 - 19:52:51 CDT
![]() |
![]() |