Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: current users enquiry
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