how to kill killed session [message #582844] |
Tue, 23 April 2013 01:52 |
|
mmi78
Messages: 31 Registered: April 2013 Location: dhaka
|
Member |
|
|
How to kill of a killed session?
I had killed inactive session using
alter system kill session 'sid,serial#';
after that that sessions marked as killed and still get in v$session.
Then i try to get spid so that i can killed then from os command kill -9 spid
but when i try to get that join with v$process, no row select.
select * from v$session where username ='CAS' and status ='KILLED'
return 205 records.
select p.*,s.username,s.program,s.machine,s.status from v$process p,v$session s
where p.addr=s.paddr and s.status='KILLED'
return no record.
|
|
|
|
|
|
|
|
|
|
Re: how to kill killed session [message #582867 is a reply to message #582858] |
Tue, 23 April 2013 03:04 |
Roachcoach
Messages: 1576 Registered: May 2010 Location: UK
|
Senior Member |
|
|
mmi78 wrote on Tue, 23 April 2013 08:50@Roachcoach, i understand after marked kill, then alter system kill session do nothing. But my main concern is in v$session it show killed for a longer time, how to kill those killed session. One way is os kill using kill -9 spid, but when i try to find out spid, i failed. I try to join with v$process for spid, but no row return for those killed session.
I also try to find out active transaction using v$transaction view, but v$transaction has no record.
select * from v$process where addr=PADDR_FROMV$SESSION
|
|
|
|
|
|
|
|
|
Re: how to kill killed session [message #582916 is a reply to message #582910] |
Tue, 23 April 2013 06:25 |
|
mmi78
Messages: 31 Registered: April 2013 Location: dhaka
|
Member |
|
|
so run alter system kill session and alter system disconnect together or alter system disconnect alone?
ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;
ALTER SYSTEM DISCONNECT SESSION 'sid,serial#' IMMEDIATE;
or
ALTER SYSTEM DISCONNECT SESSION 'sid,serial#' IMMEDIATE;
Need to know for future, if the situation arise again...
[Updated on: Tue, 23 April 2013 06:26] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|