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: current users enquiry

Re: current users enquiry

From: gazzag <gareth_at_jamms.org>
Date: 12 Dec 2006 04:28:50 -0800
Message-ID: <1165926530.064837.309420@n67g2000cwd.googlegroups.com>


gd6502_at_eudoramail.com wrote:
> Hi everybody
> For my Oracle 9i db, I need to know how many users are accessing to a
> specific schema, and, if possible, which application are they using.
> Can I obtain this goal with the user id specified for the schema,
> without using administration tools (just a query)?
> Thanks a lot
>
> Peppe

Try the following query:

select username, osuser, lpad(sid,4)||', '||lpad(serial#, 6) Proc, program, to_char(logon_time, 'DD-Mon-yy HH24:MI:SS') Logon from v$session
where username is not null
order by username, osuser, Logon;

Note that this also returns the SID and SERIAL# of each session, should you need to affect it.

HTH -g Received on Tue Dec 12 2006 - 06:28:50 CST

Original text of this message

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