Database Administration (MOSC)

MOSC Banner

Sessions automations

edited Feb 24, 2014 12:00PM in Database Administration (MOSC) 2 commentsAnswered

Conditions to check whether the session is inactive->

  1. We kill only the inactive sessions of user process only, not the background process.

  2. If session has hash value 0 and status is inactive, then only kill the sessions

  3. If session has any hash value, then this is called active sessions

  4. check sessions with v$session;

select sid, serial#, status from v$session where type='USER' and status='INACTIVE';

alter system kill session 'sid, serial#';

Correct me if I am wrong. 

I have a requirement that all the inactive sessions should be automatically killed in the database only.  There should not be any user interventions to check the sessions and kill the inactive sessions, how to achieve this ?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center