Home » RDBMS Server » Server Administration » Need to get rid of a session. (Oracle 10g R2)
Need to get rid of a session. [message #459978] Wed, 09 June 2010 04:58 Go to next message
alamsiddiqui
Messages: 13
Registered: April 2010
Junior Member
Hello everyone,

I need help regarding killing a session. I read about it and tried a few things. The problem is, we have a software which keeps a check on v$session table so that a client can not have more than one sessions running simultaneously with the server. But if a client program terminates unexpectedl, it's session information stays in the v$session table, which prevents us from opening a new instance of the client program. Using

ALTER SYSTEM KILL SESSION 'SID, SERIAL#'

doesn't help since it takes ages to rollback and release the locks. And the session stays there with a 'KILLED' status.
I want this session out of the v$session table and instantly.

Thank you.
Re: Need to get rid of a session. [message #459981 is a reply to message #459978] Wed, 09 June 2010 05:03 Go to previous messageGo to next message
cookiemonster
Messages: 13923
Registered: September 2008
Location: Rainy Manchester
Senior Member
Not going to happen. Oracle will not remove the session completely until it's finished rolling back the work and there is no way as far as I know to force it.

EDIT: typo

[Updated on: Wed, 09 June 2010 05:03]

Report message to a moderator

Re: Need to get rid of a session. [message #459984 is a reply to message #459981] Wed, 09 June 2010 05:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68653
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use DISCONNECT SESSION IMMEDIATE instead but this will load your server.
It should be better to modify the check function to ignore the sessions that are in KILLED state.

Regards
Michel
Re: Need to get rid of a session. [message #459986 is a reply to message #459981] Wed, 09 June 2010 05:13 Go to previous messageGo to next message
John Watson
Messages: 8932
Registered: January 2010
Location: Global Village
Senior Member
Can you identify what you call a "client" by username? If so, you could avoid the problem by using a profile to prevent a user from starting a second, concurrent session.
Re: Need to get rid of a session. [message #459987 is a reply to message #459984] Wed, 09 June 2010 05:16 Go to previous message
alamsiddiqui
Messages: 13
Registered: April 2010
Junior Member
Alright. Thank you all. You're doin' a great job.
Previous Topic: different sids on one oracle home
Next Topic: shared server mode
Goto Forum:
  


Current Time: Sun May 19 18:33:50 CDT 2024