Re: list users/databases

From: Craig M. Wall <cwall_at_petersons.com>
Date: 1996/07/01
Message-ID: <MPLANET.31d7ecc8cwall989685_at_nntp.noc.netcom.net>#1/1


In article <4r8nbb$qib_at_soap.news.pipex.net>, hc76_at_dial.pipex.com says...
> The question is:
> Is it possible to get a list of users that are logged onto Oracle -
> I can list this on UNIX (ps -ef | grep ora) but I can't find a way
> within Oracle.
 SNIP
> Any help would be gratefully received,
> Thanks in advance,
>
> Lisa Jarman, DBA, PECC Ltd
>

I use the following script to see who's connected, how and what program they're running. It produces output in 132 characters and contains a lot of information you may not want, so trim some out to fit in 80 chars.

/* BEGIN */
ttitle center 'SQL*NET Connections' skip 1 - center '$dba_mon:v$session_d.sql' skip 1 - left _date skip 2
column who format a10 heading "Oracle|Username"

column oswho format a10 heading "O/S|Username"
column server format a9 heading "SQLNET|Server"
column status format a8 heading "Status"
column sid format 999 heading "Sess|SID" column user# format 999 heading "Ora|ID" column process format a4 heading "O/S|PID" column terminal format a8 heading "Terminal" column serial# format 9999999 heading "Serial|Killer#" set linesize 132
select server,status,sid,serial#,user#,substr(process,5,4) process,terminal,
              substr(username,1,15) who,
              substr(osuser,1,8) oswho,
              substr(machine,1,7) "Machine",
              substr(program,1,45) "Software"
from v$session where type = 'USER'
order by oswho;
/* END */ Hope this helps.
Craig M. Wall Received on Mon Jul 01 1996 - 00:00:00 CEST

Original text of this message