Thursday, September 13, 2012

How to Manually Kill the Correct Database Session For a Hanging Forms Runtime Process



How to Manually Kill the Correct Database Session For a Hanging Forms Runtime Process


Problem Description
-------------------

You are trying to kill an operating system process ID (PID) for a specific
Oracle job, but you are unsure of the exact process number to kill.  You asked
how to find the desired PID number.

Solution Description
--------------------

Run the following select statement to find the desired process ID (PID) and
username:

   select spid, sid, a.serial#, b.username
   from v$session a, v$process b
   where a.paddr = b.addr;

Following is an example of what the query returns:

  SPID    SID     SERIAL#     USERNAME
  ----    ---     -------     --------
  11526     1        1        absmith
  11547     3        1        absmith
  11551     6        1        absmith
 

Explanation
-----------

The SPID is the actual operating system process identifier.

The SID is Oracle's session identifier.

The SERIAL# is Oracle's session serial number used to identify a session's
objects.

After the operating system PID has been killed, type the following (it is
faster than waiting for PMON to clean up the terminated process):

     alter system kill session 'sid, serial#';

No comments:

Post a Comment