Re: Finding orphan sessions

On 6/4/07, Khan, Muhammad S <Muhammad.Khan@xxxxxx> wrote:



Nice script Jared! Now the question is, how should these orphan processes
be dealt?
 ------------------------------


"alter system kill" is my preference.

Occasionally however an orphaned session may be holding a lock,
and refuse to die with 'alter system kill'.

kill -9 (or orakill on windows) should take care of it.  The problem
though with that approach is that since there is not a server PID
(assumed dedicated servers here) in v$process,  determining which
process to kill is an exercise in eliminating all the processes you do
not want to kill.  That is, those that do appear in v$process.

Potentially a dangerous operation: If you can't determine which process
it is, the database instance will need to be bounced, as someone has
no doubt brought to your attention that the lock being held by the orphan
is preventing other work from being done.

Sometimes and 'alter system kill' may take a long time, so be patient.
PMON may have a lot of cleanup to do.

--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

Other related posts: