Oracle 805, OS-Unix
Some of my sessions were waiting due to locks on table, I tried to kill the session using
SQL> alter system kill session '11,1234';
Checking the status in V$SESSION shows KILLED and never goes out from V$SESSION. WHY?????
The objects locked by killed session keeps holding the locks on the objects for long time.
When killing the session from OS (kill -9 processid) releases the locks and V$SESSION also doen't shows that session any more.
Why it is so that killing at OS level cleaned the things which were not cleaned by alter system kill session?
Why not use OS kill command always to kill the session? Is there any disadvantage in doing so?
If the user session which you are going to kill did lot of works and used a lot of resources (rollback, redo, ..) will take an enormous amount of time to kill that process from database by issuing 'Alter system kill session .....' command
The reason is that this command first marks the session for killing and is not killed untill all the resources and locks are released.
But if you use operating system command (kill -9 pid), it will directly kill the session without releasing the locks and resources. In this case PMON process is responsible to release the resources later on.
Bookmarks