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: Displaying connected users

Re: Displaying connected users

From: Chris Weiss <chris_at_hpdbe.com>
Date: Thu, 9 May 2002 02:10:36 -0400
Message-ID: <abd3t2$143t$1@msunews.cl.msu.edu>


SELECT USERNAME, OSUSER, PROCESS, PROGRAM FROM V$SESSION VS, V$MYSTAT VM
WHERE VS.SID = VM.SID (+)
AND VM.SID IS NULL; By using a NULL outer join you can filter out your current session data in V$MYSTAT from V$SESSION..

You can also look up your SID in v$mystat and simply put 'AND SID != ...' instead of joining to V$MYSTAT within your query.

Good Luck!

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Chris Weiss
mailto:chris_at_hpdbe.com
www.hpdbe.com
High Performance Database Engineering
Available for long and short term contracts

"Naru Mangalath" <nmangalath_at_hotmail.com> wrote in message
news:ec12f506.0205082017.262e353_at_posting.google.com...

> Hi,
> I am using the following select to display connected users:
>
> select username,osuser,process, program from v_$session
> where username is not NULL
>
> This works fine except that it also displays this active sqlplus
> session. How can I display all the connected users except the session
> that displays it?
>
> Thanks in advance!
>
> Naru Mangalath
Received on Thu May 09 2002 - 01:10:36 CDT

Original text of this message

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