Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

not able to kill session

Posted on 2012-04-09
4
Medium Priority
?
647 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 38

Assisted Solution

by:Gerwin Jansen, EE MVE
Gerwin Jansen, EE MVE earned 500 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 500 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 1000 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 1000 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
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 information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

963 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