Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Finding User sessions = idle > 30 min??
Denham,
To find the idle time for a user can be difficult with a script. If
you query the v$session you can get the STATUS and LOGON_TIME and
calculate the difference from current time, But that does not tell you
when they became inactive. They might have run a query that ended 20
minutes ago or 5 minutes ago and thier status will be INACTIVE. It
probabily is more efficient to use an IDLE-TIME parameter on the NET8
side of the house. Remember, the IDLE-TIMEOUT function will still use a
process and the user will still think they are connected to the
database. When then use the connection again they are notified that they
are no longer connected and then the process is dropped.
Ron
>>> EvaD_at_TFMC.co.za 12/10/02 08:18AM >>>
Hello All,
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.
Best Regards
Denham Eva
Oracle DBA
"UNIX is basically a simple operating system, but you have to be a
genius to
understand the simplicity."
Dennis Ritchie.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.
For more information please visit www.marshalsoftware.com
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Ron Rogers INET: RROGERS_at_galottery.org 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 Tue Dec 10 2002 - 08:34:53 CST
![]() |
![]() |