How To Find The Process Identifier (pid, spid) After The Corresponding Session Is Killed? (Doc ID 387077.1)

Last updated on JULY 06, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.1 to 12.2.0.1 [Release 9.2 to 12.2]
Information in this document applies to any platform.
***Checked for relevance on 04-Feb-2016***


Symptoms

When killing a session with 'alter system kill session' the value paddr in v$session changes while the addr corresponding value in v$process does not.
As a result, it is no longer possible to identify the process that has been killed and terminate it at OS level

It is very easy to check (on a solaris 64 bit machine):
1. Create a new session
2. get the sid:

SQL> select distinct sid from v$mystat;
SID
---
140


3. check paddr in v$session and addr in v$process (and the spid of the process)

SQL> select spid,addr from v$process where addr in (select paddr from
v$session where sid=140);

SPID ADDR
------------ ----------------
1011 0000000398E5CAA0


4. kill the session

SQL> alter system kill session '140,9752';



5. check paddr in the v$session and addr in v$process:

SQL> select paddr from v$session where sid=140;

PADDR
---------------------
0000000398E9E3E8

SQL> select addr from v$process where spid=1011;

ADDR
---------------------
0000000398E5CAA0


As it can be seen, after killing the session, the paddr changes only in v$session. It is no longer possible to join the 2 views.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms