Of course, LOGON_TIME doesn't tell you anything about how long the sesson has been inactive. For that you have to check column LAST_CALL_ET, which stores the elapsed time in seconds from the last call to the RDBMS by that session.
To find all the sessions that have been inactive for more than 2 hours, your query would look something like:
Code:
SELECT * FROM v$session
WHERE STATUS != 'ACTIVE'
AND last_call_et > 2*60*60;
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?