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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Finding User sessions = idle > 30 min??

RE: Finding User sessions = idle > 30 min??

From: Jeremiah Wilton <jwilton_at_speakeasy.net>
Date: Wed, 11 Dec 2002 03:09:03 -0800
Message-ID: <F001.005175CC.20021211030903@fatcity.com>


The last_call_et column of v$session shows the seconds elapsed since the session last made a database call, regardless of the current wait event. This is how I have always identified idle sessions.

And Naveen is right. The seconds_in_wait column of v$session_wait shows the actual time spent waiting.

--
Jeremiah Wilton
http://www.speakeasy.net/~jwilton

On Wed, 11 Dec 2002, Naveen Nahata wrote:


> Won't 'seconds_in_wait' show the total time waited for the session rather
> than the current wait time?
>
> -----Original Message-----
> Denham - I'm going to make a guess here and someone will probably correct
> me. How about
> select sid from v$session_wait where event = 'SQL*Net message from
> client' and seconds_in_wait > 1800
> You can join to other tables like V$SESSION to get more information.
>
> -----Original Message-----
> Please help - I am trying to find/create a script that will return all user
> sessions whose Idle time is greater than 30 minutes.
>
> ie
> SELECT SID, SERIAL#
> FROM V$SESSION
> " WHERE IDLE_TIME > 30 min;"
>
> My forays into the Documentation and searches have not been very successful.
>
> I don't really want to do this via the roles IDLE_TIME setting, I very much
> would like to be able to query directly to the database.
>
> Based on the information I would then make the decision to kill the user
> process etc.
> Just in case you might be interested it is Oracle 817 DB on Windows 2k.
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jeremiah Wilton INET: jwilton_at_speakeasy.net Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Received on Wed Dec 11 2002 - 05:09:03 CST

Original text of this message

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