Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: show user connections
Try this stuff:
rem
rem file: %DBA_TOOLS%/CURusers.sql
rem
rem This SQL*Plus script helps identify users currently rem connected to the database and the statement they rem are currently running. rem rem 11-JUL-96 Created. Mike M.
set linesize 80
column pu format a8 heading 'O/S|Login|ID' justify left column su format a8 heading 'Oracle|User ID' justify left column stat format a8 heading 'Session|Status' justify left
column ssid format 999999 heading 'Oracle|Session|ID' justify right column sser format 999999 heading 'Oracle|Serial|No' justify right column spid format 999999 heading 'UNIX|Process|ID' justify rightcolumn txt format a28 heading 'Current Statment' justify center word
select p.username pu, s.username su, s.status stat, s.sid ssid, s.serial# sser, lpad(p.spid,7) spid, substr(sa.sql_text,1,540) txt from v$process p, v$session s, v$sqlarea sa where p.addr=s.paddr and s.username is not null and s.sql_address=sa.address(+) and s.sql_hash_value=sa.hash_value(+)order by 1,2,7
column pu clear
column su clear
column stat clear
column ssid clear
column sser clear
column spid clear
James Chen <james_at_iweave.com> wrote in article
<33C575A7.7A1F_at_iweave.com>...
> Here is a newbie question:
>
> How can I show all the user connections in an Oracle database ?
>
> I am using Oracle 7.3.2.x.
>
> Thanks in advance,
>
> --
> James Chen, at Interweave Software, Inc.
> james_at_iweave.com
>
Received on Fri Jul 11 1997 - 00:00:00 CDT
![]() |
![]() |