Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL to get currently logged in users
In article <6mlofr$ffn$1_at_news.ap.net>, "Elliott Mehrbach" <elliott_at_ap.net> writes:
> I am looking for the correct SQL to run to just get a list of currently
> logged in users on a specific database. Any help would be appreciated.
>
>
Try this:
set space 1
set feedback off
set pagesize 66
set linesize 2000
col username format a8
col osuser format a8
col machine format a8
col status format a10
col type format a5
col program format A35
col logon_time format A25 Heading 'LOGIN DATE/TIME'
select username, osuser, machine, status, type, program,
to_char(logon_time, 'MM/DD/YYYY HH24:MI:SS') logon_time
from v$session
order by username, osuser;
quit;
Received on Mon Jun 22 1998 - 09:42:49 CDT
![]() |
![]() |