此内容已被标记为最终。 显示 9 条回复
Here is the information from the documentation:
ACTIVE - Session currently executing SQL
KILLED - Session marked to be killed
CACHED - Session temporarily cached for use by Oracle*XA
SNIPED - Session inactive, waiting on the client
Thank you for your reply.
This is my dilemma, the documentation does not define INACTIVE and does define SNIPED as "Session inactive, waiting on client". Need to know the difference between INACTIVE and SNIPED.
this is my confusion too..many a time when i check session i find hunderds of inactive sessions ..what does that mean
Inactive - nothing is being done, server waits for tasks to be assigned from the client.
Sniped - the session has passed the idle_time limit defined in user profile. The session will remain snipped until the client communicates with the db again, when it will get "ORA-02396: exceeded maximum idle time, please connect again" and the session is removed from v$session.
Inactive means the session is connected, and idle. The client is not currently making a database call.
Sniped means the system has killed the session, but the client doesn't know it.
When IDLE_TIME is set in the users' profiles or the default profile. This will kill the sessions in the database (status in v$session now becomes SNIPED) and they will eventually disconnect. It does not always clean up the Unix session (LOCAL=NO sessions). At this time all oracle resources are released but the shadow processes remains and OS resources are not released. This shadow process is still counted towards the parameters of init.ora.
This process is killed and entry from v$session is released only when user again tries to do something. Another way of forcing disconnect (if your users come in via SQL*Net) is to put the file sqlnet.ora on every client machine and include the parameter "SQLNET.EXPIRE_TIME" in it to force the close of the SQL*Net session.
For further references:
Re: session inactive ??
Re: make a job to delete the sniped sessions
Re: How do I put a timeout in my DataBase?
Re: Killing Session with Locks in Linux
I have 200 sessions inactive, if my reosurce_limit is SESSION=200, when other session need to open, what will hapen? Some INACTIVE SESSION will release?
Message was edited by:
No, the one trying to connect will get an error.
You can use profiles to limit the time a session can remain idle if you want to terminate those sessions.