Re: Active Sessions

From: Slarti <1012-873_at_gmx.de>
Date: 22 Jan 2002 07:21:19 -0800
Message-ID: <ccb8e3b6.0201220721.2cb7c5a3_at_posting.google.com>


All right,
try this one, but you'll have the appropriate system privileges:

SELECT

  S.STATUS "Status",
  S.SERIAL# "Serial#",
  S.TYPE "Type",
  S.USERNAME "DB User",
  S.OSUSER "Client User",
  S.SERVER "Server",
  S.MACHINE "Machine",
  S.MODULE "Module",
  S.CLIENT_INFO "Client Info",
  S.TERMINAL "Terminal",
  S.PROGRAM "Program",
  P.PROGRAM "O.S. Program",
  s.logon_time "Connect Time",

  lockwait "Lock Wait",
  s.process "Process", 
  p.spid, 
  p.pid,  
  s.audsid,
  s.sql_address "Address", 
  s.sql_hash_value "Sql Hash", 
  s.Action

FROM
  V$SESSION S,
  V$PROCESS P
WHERE S.paddr = P.addr(+)
  AND (s.USERNAME is not null) 
  AND (NVL(s.osuser,'x')<>'SYSTEM')  
  AND (s.type<>'BACKGROUND'); 

Regards

"Geoffrey" <g.dufour_at_swing.be> wrote in message news:<3c4d3fde$0$33510$ba620e4c_at_news.skynet.be>...
> Hi,
>
> Can you tell me how to get information about all active sessions :
>
> - Username
> - Status
> - ID
> ...
>
> What SQL statement allows you to get this ?
>
> Regards.
Received on Tue Jan 22 2002 - 16:21:19 CET

Original text of this message