Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Q: Time user connected
The following SQL worked just fine until I upgraded to V7.3. I can't seem to find the problem.
/*
Description: time a current user connected to the database.
*/
set pages 60
set linesize 80
col s.sid heading SID format 999
select s.sid, to_char(sysdate - ((t.hsecs - s.value)/8640000)
,'MM/DD/YYYY HH24:MI:SS') "CONNECT TIME"
from sys.v$sesstat s,sys.v$statname n,sys.v$timer t
where n.name = 'session connect time'
and n.statistic# = s.statistic#
and s.value !=0
order by s.sid;
Received on Tue Jan 07 1997 - 00:00:00 CST