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: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 02 May 2007 17:52:51 -0700
Message-ID: <1178153568.812456@bubbleator.drizzle.com>


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.org
Received on Wed May 02 2007 - 19:52:51 CDT

Original text of this message

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