Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: users

Re: users

From: David Novak <david_novak_at_miesto.sk>
Date: 2000/07/12
Message-ID: <963432075.115758@virtual.nextra.sk>#1/1

Thank you for this hint. But is there any log file, where is this information stored?

Ethan Post <epost1NOepSPAM_at_yahoo.com.invalid> wrote in message news:003d20d9.ec2df696_at_usw-ex0105-037.remarq.com...
> I could just tell you to use the v$sessions veiw but that would
> be to easy, try this script (note some statistic#'s might be
> different on your version of Oracle)
>
> -Ethan
> http://www.freetechnicaltraining.com/article_10.htm
> http://www.gnumetrics.com
> *************************
>
> select
> nvl(s.username, ' ') "User Name",
> nvl(osuser, ' ') "OS User",
> s.sid "SID",
> type "Type",
> s.serial# "Serial#",
> s.logon_time "Logon Time",
> trunc(last_call_et/60/60, 2) "Last Call (Hours)",
> sysdate - last_call_et/60/60/24 "Last Call",
> machine "Machine",
> terminal "Terminal",
> program "Program",
> sum(decode(ss.statistic#, 40, ss.value, 0)) "Physical Reads",
> sum(decode(ss.statistic#, 41, ss.value, 0)) "Physical Writes",
> sum(decode(ss.statistic#, 39, ss.value, 0)) "Consistent Gets",
> sum(decode(ss.statistic#, 162, ss.value, 0)) "Session Disk
> Sorts",
> sum(decode(ss.statistic#, 161, ss.value, 0)) "Session Memory
> Sorts",
> trunc(sum(decode(ss.statistic#, 155, ss.value/1024000, 0)),
> 2) "MB Sent To Client SQL Net",
> trunc(sum(decode(ss.statistic#, 156, ss.value/1024000, 0)),
> 2) "MB Rec From Client SQL Net"
> from
> v$sesstat ss,
> v$statname sn,
> v$session s
> where
> ss.statistic# = sn.statistic# and
> ss.statistic# in (40, 41, 39, 162, 161, 155, 156) and
> s.sid = ss.sid
> group by
> s.username,
> osuser,
> s.sid,
> type,
> s.serial#,
> s.logon_time,
> trunc(last_call_et/60/60, 2),
> sysdate - last_call_et/60/60/24 ,
> machine,
> terminal,
> program
>
>
>
>
> -----------------------------------------------------------
>
> Got questions? Get answers over the phone at Keen.com.
> Up to 100 minutes free!
> http://www.keen.com
>
Received on Wed Jul 12 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US