Home » RDBMS Server » Server Administration » When oracle mark the session INACTIVE? (Oracle 9.2.0.8)
When oracle mark the session INACTIVE? [message #352237] Mon, 06 October 2008 14:43 Go to next message
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 #352239 is a reply to message #352237] Mon, 06 October 2008 14:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68666
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
A session is inactive when Oracle is not currently doing work for it.

Regards
Michel
Re: When oracle mark the session INACTIVE? [message #352242 is a reply to message #352239] Mon, 06 October 2008 15:17 Go to previous messageGo to next message
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

Re: When oracle mark the session INACTIVE? [message #352277 is a reply to message #352242] Mon, 06 October 2008 23:18 Go to previous messageGo to next message
Michel Cadot
Messages: 68666
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is no gap. As soon as Oracle is not doing some work for a session, the session is inactive. You don't need to take a coffee, just your natural response time turns your session to inactive.

Regards
Michel
Re: When oracle mark the session INACTIVE? [message #352406 is a reply to message #352277] Tue, 07 October 2008 08:40 Go to previous message
shrinika
Messages: 306
Registered: April 2008
Senior Member
Okay. Thank you.
Previous Topic: Need to get the hex value of a character column.
Next Topic: Resize datafile
Goto Forum:
  


Current Time: Sun Jul 07 23:57:52 CDT 2024