Re: Problem shutting down Oracle 7.1.4

From: Matthew M. Lih <matt.lih_at_trw.com>
Date: 1995/11/14
Message-ID: <48aova$a41_at_venice.sedd.trw.com>#1/1


In article <1995Nov11.231904.8393_at_ohstpy>, viznyuk_at_ohstpy.mps.ohio-state.edu (Dragon Fly) says:

>When writing and running backup script
>I ran onto the following problem:
 

>I want to kill the sessions before I run
>dbshut shutdown script.
>So I do for all sessions except myself and oracle:
>ALTER SYSTEM KILL SESSION 'SID, SERIAL#';
 
>It responds with
 

>System altered
 

>Then I exit sqldba and run dbshut script
>which essentially does
>connect internal
>shutdown immediate
 

>The problem is:
>It hangs infinetely.
 

>The alert*.log file says:
>SHUTDOWN: waiting for logins to complete..
 

>Could anybody give a hint what's the problem
>here and why it won't shutdown if I do
>ALTER SYSTEM KILL SESSIONS before doing shutdown?
 

>dbshut won't hang if I do not do ALTER SYSTEM KILL SESSION prior
>to that..
 

>Thanks,
>Serge

I'm not sure why, you're having a problem with it, but ...

Why bother issuing the ALTER statement anyway? The SHUTDOWN IMMEDIATE will definitely kill any active sessions. What you really should be worrying about is restarting the database and doing a SHUTDOWN NORMAL after the SHUTDOWN IMMEDIATE; this gives Oracle a chance to clean up after itself, including stuff left over from killed sessions.

(BTW, I've found trying to kill sessions has a 50% chance of  working if something went wrong in the session, e.g., it  hung. Trying to kill a hung session often results in having  the session "marked for kill", which means that it's still  around, just not doing anything. Perhaps the SHUTDOWN  IMMEDIATE treats "marked for kill" sessions differently.)

Matthew M. Lih
Software Lead, SAIN Project
TRW Data Technologies Division. Received on Tue Nov 14 1995 - 00:00:00 CET

Original text of this message