Link to home
Start Free TrialLog in
Avatar of IanBlundell
IanBlundell

asked on

Life after ALTER SYSTEM KILL SESSION

What can stop ALTER SYSTEM KILL SESSION 'n,n' from actually killing a session?
A particular example: A multi-threaded application runs on a separate server against an Oracle 8.1.7 database. The server running the application restarts. When running a query for the current database sessions using v_$session the now dead application's sessions still appear. Issuing a KILL seems to make no difference.

The sessions eventually disappear from v_$session but I am unsure as to whether the DB has tidied these up because it realises they are inactive or because the KILL has marked them as inactive and the DB gets around to tidying them up. In any case why would the database not kill the session immediately as it does other user sessions? Or, is the database killing the sessions immediately and v_$session just isn't the right place to look?

I would appreciate any help.
SOLUTION
Avatar of schwertner
schwertner
Flag of Antarctica image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of IanBlundell
IanBlundell

ASKER

Experts

Thanks for your responses. In an attempt to be fair handed I am going to spread out the points as follows:

schwertner: 40 points for the most concise answer.
seazodiac: 50 points for an expanded answer with some pointers.
AlbertYou: 35 points for a way to try and kill the errant sessions (although this wasn't requested - it might come in useful).

I have found that the orakill does not always work in windows enviroment.

Sometime the user restart their computer in hopes that it will remove the 'Killed' status.

So when I for example issue:
orakill 28 3124

I get an error saying:
Could not attach to Oracle instance 28: err = 2

And the process still sticks around.