Solved

not able to kill session

Posted on 2012-04-09
4
636 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

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 setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now