Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Time client last active time
I am trying to determine the date and time a client machine last
interacted
with the database. When a user reboots a pc the session can remain for
a
long period of time. I would like to have the system check for any
sessions
which have been inactive for over an hour and kill the session.
I use profiles which will terminate a user session, if the user
interacts
with the database after the alloted time expires. This does work well
with users who reboot their PCs.
The query below is supposed to return the last non-idle time but the value returned is about a month in the future.
Has anyone else run into this problem and found a solution?
SELECT USERNAME, TO_CHAR(SYSDATE - (HSECS-s.VALUE)/(3600*100*24),
'MM-DD-YYYY HH24:MI:SS')
FROM V$SESSTAT S, V$SESSION SE , v$timer
WHERE SE.SID = S.SID AND STATISTIC#=14
and username is not null
/
Received on Sun Jan 04 1998 - 00:00:00 CST