However setting profile with the IDLE_TIME will not actually kill the session after the specified time of inactivity! That session will stay there in inactive state even after the specified idle time. It will only be disconnected when next activity on that session is attempted. So if user doesn't get back and try to do something after two hours of inactivity, the session will still be hanging there on the database. It will still eating the resources, prossibly forewer if you don't kill it manually!
Jurij Modic ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
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?
Bookmarks