Login to all the nodes/machines and try to query :
select sid, serial# from v$session where sid='@@@';
kill the session :
alter system kill session 'sid,serial#' immediate;
select status from v$session where sid='@@@';
If the status says INVALID then ignore, else
while killing the session, if the status says "ORA-00031: session marked for kill", the status will show "killed". In this case, try to kill the session in the OS.
Run the below query to get the spid along with other useful details.
SET LINESIZE 100
COLUMN spid FORMAT A10
COLUMN username FORMAT A10
COLUMN program FORMAT A45
SELECT s.inst_id,
s.sid,
s.serial#,
p.spid,
s.username,
s.program
FROM gv$session s
JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE s.type != 'BACKGROUND';
Get the spid for the appropriate sid and in the OS level, issue the following command.
kill -9 spid
Sometimes, you would get the below error :
ORA-00027 cannot kill current session
In this case, make sure you and the users have logged out of the session.
No comments:
Post a Comment