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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Time client last active time

Re: Time client last active time

From: rsenn <rsenn_at_capaccess.org>
Date: 1998/01/06
Message-ID: <34B2E71E.8E98446F@capaccess.org>#1/1

Claus Behrens wrote:

> 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
> /

I haven't run into the problem, but I might suggest you test your formula against a known event, one that you stage, then adjust your formula so that the value returned matches your observed date and time. Received on Tue Jan 06 1998 - 00:00:00 CST

Original text of this message

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