Solved

not able to kill session

Posted on 2012-04-09
4
640 Views
Last Modified: 2012-04-26
Hi,
I am not able to kill a session.

SQL>  ALTER SYSTEM KILL SESSION '889, 46821'  immediate;

System altered.

SQL> SELECT STATUS FROM V$SESSION WHERE SID='889';

STATUS
--------
ACTIVE
0
Comment
Question by:dba1234
  • 2
4 Comments
 
LVL 37

Assisted Solution

by:Gerwin Jansen
Gerwin Jansen earned 125 total points
ID: 37824902
As what user are you trying this? When you try to kill the session as the same user that owns the session, it should work.
0
 
LVL 18

Accepted Solution

by:
sventhan earned 125 total points
ID: 37824942
It takes some time. Try killing it from unix

kill -9 processid
0
 
LVL 16

Assisted Solution

by:Wasim Akram Shaik
Wasim Akram Shaik earned 250 total points
ID: 37824949
author, you might have got confused with the sid..

oracle allocates SID(Service Identifiers) dynamically, it doesn't mean that you just have killed a SID and it should not appear again..

yes, for some time, the SID,Serial# combination will not appear

check with sid and serial#

you should use your query like this

SELECT STATUS FROM V$SESSION WHERE SID='889' and serial#='46821'  

then you can actually see whether the process got killed or not..

to be more precise, you can check the paddr from the v$session before killing the session like this

select paddr V$SESSION WHERE SID='889'  and place this value in

select * from v$process where addr='<pddr from above query>' to get the OS process id,where in you can check the status at Operating System level too..!!!
0
 
LVL 16

Assisted Solution

by:Wasim Akram Shaik
Wasim Akram Shaik earned 250 total points
ID: 37824958
its possible that the sid which you have just killed might have got allocated with some other process, so you are seeing it again.. as mentioned in my earlier comment check the sid and serial# combination..

and be careful while seeing alone the SID it will lead to killing of some unwanted process which may lead to some other problems..
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question