|
Re: Unix-Q:Find users on the system whose User-ids are > 99 [message #97822 is a reply to message #97799] |
Tue, 18 February 2003 11:33 |
anjan saikia
Messages: 11 Registered: February 2003
|
Junior Member |
|
|
Try this out.. (modify it accordingly)
SET LINESIZE 1000
/
SET PAGESIZE 45
/
SELECT S.USERNAME "Oracle Username",
s.osuser "OS Username",
i.consistent_gets "Consistent Gets",
i.physical_reads "Physical Reads",
ROUND(100-((I.PHYSICAL_READS*100)/decode((I.CONSISTENT_GETS+
I.BLOCK_GETS),0,1,(I.CONSISTENT_GETS+I.BLOCK_GETS))),2)"Hit Rate",
s.status "Status",
s.sid "SID",
s.serial# "Serial #",
s.machine "Machine",
s.program "Program",
to_char(logon_time, 'DD/MM/YYYY HH24:MI:SS') "Logon Time",
w.seconds_in_wait "Idle time"
from v$session s, v$sess_io i, v$session_wait w
where s.sid = i.sid
and s.sid = w.sid(+)
and 'SQL*Net message from client' = w.event(+)
and s.osuser is not null
and s.username is not null
order by 6 ASC, 3 DESC, 4 DESC
/
|
|
|