Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Script for performing clean shutdown before windows shutdown

Re: Script for performing clean shutdown before windows shutdown

From: <fitzjarrell_at_cox.net>
Date: 27 Aug 2005 13:50:50 -0700
Message-ID: <1125175850.074642.58550@g43g2000cwa.googlegroups.com>


Comments embedded.
Andreas Sheriff wrote:
> Comments inline.
>
> <fitzjarrell_at_cox.net> wrote in message
> news:1125084808.407326.274810_at_g44g2000cwa.googlegroups.com...
> >

<..snipped..>
> >>
> >> SHUTDOWN ABORT is the same thing as executing
> >> kill -s KILL $(ps -Af | gawk '/ora_${ORACLE_SID}/{print $2}')
> >> It KILLs all Oracle instance processes for that SID. You go ahead and
> >> keep
> >> using SHUTDOWN ABORT.
> >
> > And I will when I deem it necessary. Let's look at the suggested
> > procedure again:
> >
> > connect / as sysdba
> > alter system switch logfile;
> > shutdown abort
> > startup mount restrict
> > alter system set job_queue_processes=0;
> > alter database open;
> > shutdown immediate
> >
> > I see no issue with what has been posted. A shutdown abort has been
> > issued to ensure the instance stops. A startup mount restrict is then
> > executed, followed by an alter dsatabase open, to enable the necessary
> > recovery after the shutdown abort. The database is finally shutdown
> > immediate, requiring no recovery on startup.
> >
> > Had only a simple 'shutdown abort' been suggested I may have tended to
> > agree with your assessment. However, in this situation your advice is
> > wrong.
> >
> >
> >>
> >> There are only two instances in which you should use SHUTDOWN ABORT
> >> 1. When the instance is not responding. An alternative would be to use
> >> STARTUP FORCE then SHUTDOWN IMMEDIATE. STARTUP FORCE would call SHUTDOWN
> >> ABORT anyway, then restart the instance. Using SHUTDOWN abort directly
> >> or
> >> indirectly may require recovery, or even restore at the next startup.
> >> 2. When the instance isn't started at all. In my 9i RAC class we've had
> >> to
> >> use SHUTDOWN ABORT after shutting down the instance normally because
> >> there
> >> were left over footprints (muteces and or semaphores, I suspect) for the
> >> instance after a normal shutdown.
> >>
> >
> > Incorrect. This is a case where shutdown abort is useful, especially
> > as other Oracle services may be running which could interfere with a
> > plain-vanilla shutdown immediate.
> >
> > Shutdown abort is no worse than any other shutdown mode, it only defers
> > recovery until the next startup. Yes, it is a 'brute force' method to
> > shutdown an instance; sometimes that is necesary to ensure the instance
> > stops in a timely manner. One cannot wait forever for Oracle to shut
> > down when a server is in the midst of a reboot.
> >
>
> What do you think would happen if Oracle were in the middle of writing to a
> block when you issue SHUTDOWN ABORT?
>
> There are some disk systems that would prevent partial writes, but then
> again, there are some disk systems that do not prevent partial writes and
> leaves files open.
>
> It's never good to have a partial write done to a disk or to kill programs
> that have files open. If it were ok to use SHUTDOWN ABORT because it's "no
> more worse than any other shutdown mode", then why don't you just hit "the
> big red switch" and be done with it?
> I'll tell you how you can find out.
> Just type lsof on any unix system and you'll see.
>

An interesting comment regarding a utility not available on Solaris:

# lsof
lsof: not found
# man lsof
No manual entry for lsof.
#

One would expect 'root' to have access to such a utility, yet there is no such program or script on Solaris, nor is there any manual page describing it. Your 'any unix system' comment, therefore, is in error.  Yes, to the unintiated UNIX is UNIX; those who have worked on various distributions from numerous vendors know differently. AIX != HPUX != Solaris != DGUX != RISCos, to name but a few; any number of releases of Linux differ from each other in similar ways. It would help tremendously for you to know your operating systems before issuing blanket statements such as yours. That a utility/program/script exists in one release by one vendor in no way makes it a universal component of all UNIX releases and versions. And, if Solaris is the ONLY distribution of UNIX not possessing lsof, it is enough to make your statement invalid.

> Sure, use shutdown abort as a last resort, but only as a last resort, not as
> a replacement for your usual shutdown procedure.
>

I never stated using it as a replacement for the USUAL shutdown procedure and you will have a difficult time proving I wrote any such text. Windows servers in need of a reboot create a different situation than normal, and, as such, may require more 'extreme' measures. Obviously you've not administered Oracle on a Windows machine.

> > Again, this is surprising advice from a professed OCP.
>
> OCP, 6 years Oracle experience and twelve years programming experience with
> all kinds of languages and operating systems.
>
> Again, this is surprising advice form a professed Oracle Professional
> without credentials.
>

I have already answered this erroneous comment in a prior post. Again, the fact I do NOT choose to wear my 'credentials' on my sleeve is of no concern to you, nor does it indicate that I do not possess such 'credentials'. Seventeen years of Oracle database administration experience, as well as OCP certification, qualifies as 'credentials'. I am still waiting for your apology for such a flippant and errant remark.

> >
> >> --
> >>
> >> Andreas Sheriff
> >> Oracle 9i Certified Professional
> >> Oracle 10g Certified Professional
> >> Oracle 9i Certified PL/SQL Developer
> >> ----
> >> "If you don't eat your meat, you cannot have any pudding.
> >> "How can you have any pudding, if you don't eat your meat?"
> >>
> >> DO NOT REPLY TO THIS EMAIL
> >> Reply only to the group.
> >
> >
> > David FItzjarrell
> >
>
>
> --
> Andreas
> Oracle 9i Certified Professional
> Oracle 10g Certified Professional
> Oracle 9i Certified PL/SQL Developer
>
>
> "If you don't eat your meat, you cannot have any pudding.
> "How can you have any pudding if you don't eat your meat?!?!"
> ---
>
> WARNING:
> DO NOT REPLY TO THIS EMAIL
> Reply to me only on this newsgroup

David Fitzjarrell Received on Sat Aug 27 2005 - 15:50:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US