When oracle mark the session INACTIVE? [message #352237] |
Mon, 06 October 2008 14:43 |
shrinika
Messages: 306 Registered: April 2008
|
Senior Member |
|
|
Hello,
I wanted to run the script to kill any session is inactive for last four hours.
Here is the script i am using.
SELECT 'ALTER SYSTEM KILL SESSION '||''''||sid||','||serial#||''''||' immediate;'
FROM v$session
WHERE status ='INACTIVE'
and logon_time <= sysdate - (4*(60/1440))
and UPPER(machine) IN(
UPPER('APPSERVER1'),
UPPER('APPSERVER2'),
UPPER('APPSERVER3'))
Let us say, user logon at 8AM and he/she works continuously for 4 or 5 hours. and the system is idle
for some time and session becomes inactive. So, the system is not really inactive for 4 hours. I am little
confused how i can find out the session are inactive for last four hours..
My ultimate question is, When oracle marks the V$SESSION.STATUS field as INACTIVE?
Any help appreicated.
Thanks
Shrinika.
|
|
|
|
Re: When oracle mark the session INACTIVE? [message #352242 is a reply to message #352239] |
Mon, 06 October 2008 15:17 |
shrinika
Messages: 306 Registered: April 2008
|
Senior Member |
|
|
Michel, Thanks for the update. But i am looking more specific answer. Please help me on this.
Let us say, user login at 8AM. He/she works till 1PM. Then stop working and taking coffee break
for 10 min. Does oracle mark it as INACTIVE? My ideal question is, What is the time gap between
changing the status from ACTIVE to INACTIVE?
Thanks
Shrinika
[Updated on: Mon, 06 October 2008 15:18] Report message to a moderator
|
|
|
|
|