It is therefore no longer possible to identify the process that has been killed and terminate it at OS level.
Under some circumstances if a session gets killed, the session is not getting cleaned up immediately but keeps showing up in V$SESSION. There can be several reasons for this: rollback operations etc.
Example for killing a session via sqlplus (issued as SYS ) :
ALTER SYSTEM KILL SESSION '<SID>,<SERIAL#>' ;
<SID> and <SERIAL#> in the above example are taken from the columns SID, SERAL# from the V$SESSION view.
Example killing a session with SID=28 and SERIAL=33455
ALTER SYSTEM KILL SESSION '28,33455' IMMEDIATE;
To find processes which have no matching PADDR in V$SESSION you can issue this query to find the corresponding OS process IDs:
select
*
from
v$process
where
addr not in (select paddr from v$session)
and addr not in (select paddr from v$shared_server)
and addr not in (select paddr from v$bgprocess)
and program!= 'PSEUDO';
No comments:
Post a Comment