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: Q: Idle time of sessions

Re: Q: Idle time of sessions

From: Joel Garry <joelga_at_pebble.ml.org>
Date: 6 May 1998 14:36:07 -0700
Message-ID: <6iql47$mn4$1@pebble.ml.org>


In article <567.430T497T11382532_at_rheingau.netsurf.de>, Lothar Armbrüster <lothar.armbruester_at_rheingau.netsurf.de> wrote:
>Hello out there,
>
>I'm wondering how to get the time a specific Oracle session is idle.
>In v$session I can find the logon time but there is no information about
>the idle time.
>I looked in all_tab_columns for a column_name like %IDLE% but did not find
>anything useful.
>As I know that one can limit the idle time using profiles, I think it must
>be possible to find out that time.
>Any ideas?

Well, you can know the last NON_IDLE time from select sid, to_char(sysdate - (hsecs-s.value)/(24*3600*100) from v$sesstat s, v$statname n, v$timer where n.name = 'process last non-idle time' and n.statistic# = s.statistic#
and s.value !=0;
according to the advanced oracle tuning book. I would expect the difference between that and the current time would be idle time. This would make a test for idle time a lot simpler than constantly updating an idle time.

>
>Thanks in advance,
>Lothar
>
>--
>Lothar Armbrüster | lothar.armbruester_at_rheingau.netsurf.de
>Schulstr. 12 | lothar.armbruester_at_t-online.de
>D-65375 Oestrich-Winkel |
>

--
These opinions are my own and not necessarily those of Information Quest

jgarry@eiq.com                           http://www.informationquest.com

http://ourworld.compuserve.com/homepages/joel_garry "See your DBA?" I AM the @#%*& DBA! Received on Wed May 06 1998 - 16:36:07 CDT

Original text of this message

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