Re: Using Shutdown Immediate

From: Thomas J Kyte <tkyte_at_us.oracle.com>
Date: 1995/08/18
Message-ID: <411053$o28_at_inet-nntp-gw-1.us.oracle.com>#1/1


mmyers_at_plano.net (Matt Myers) wrote:

>Here is yet another point of view on this whole topic. And since we're
>quoting manuals, I'll just quote from another source that seems to have
>done a bit more research into the whole backup/recovery subject.
 

>In the "Oracle Backup & Recovery Handbook" by Rama Velpuri(pg 30), here's what
>it says about shutdown normal: "The normal shutdown process stops all user
>access to the database, waits until all users complete their requests and
>disconnect from the server, purges data buffer and redo log caches and
>updates data files and online redo logs, drops file locks, completes
>ongoing transactions, updates file headers, closes thread, drops the database
>instance lock, and synchronizes control files and data files."
 

>Fair enough, right?
 

>Here's what it says about shutdown immediate: "If this option is used
>to shut down the database, the current SQL statements that are being
>processed by Oracle are terminated immediately, any uncommitted transactions
>are rolled back, and the database is shut down. The only disadvantage of
>using this option is that Oracle doesn't wait for the current users to
>disconnect. However, the database will be consistent and no recovery is

                                 ^^^^^^^^^^^^^^ THIS IS REALLY VERY WRONG

>required during next startup."
 

>Hmmmmm.

Actually, if you read their descriptions you should be able to TELL that immediate may require recovery (recovery being the act of applying REDO logs to roll forward things in this case). Under normal shutdown, they go out of their way to say "... purges data buffer and redo log caches and updates data files and ...". They basically have described a full, compleleted checkpoint along with some other clean up activities. Under immediate, they explicity leave this out (cause it just happen during immeidate shutdowns).

In reviewing my own alert files i have noticed:

shutdown NORMAL *never* has the message "Beginning Crash Recovery of N threads" in the next startup sequence.

shutdown ABORT *ALWAYS* has that message in the next startup sequence

after a system CRASH, we always have that message in the next startup.

after a shutdown immediate, *SOMETIMES* i have "Crash Recovery", Sometimes not. Just as the manual states (the database MAY have to recover, it may not).

This goes to show that recovery is in fact SOMETIMES needed after shutdown immediate.

>As most of us know, the Oracle manuals can leave things to be either a
>little bit vague or slanted toward the cautious side. The book quoted
>above draws upon the knowledge and experience of several people within
>Oracle itself.

In this case however the manuals (specifically the Admin Guide) is *very* clear (eg: it says DON"T backup these files up after shutdowm immediate, it says DATAFILES MAY require recovery).

Last time-- Don't do a cold backup of shutdown immediate data. It needs recovery, it is not good enough to back it up. You will get burned someday if you do.

I think the book you have needs to be fixed with respect to this point. The book is wrong, and gives bad advice in this case (advice that will lead to backups that are useless). They also need to add to the drawbacks for shutdown immediate that the database may need recovery and you can't back it up.

>Matt Myers
>Symmetry Consulting Corp.

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government Received on Fri Aug 18 1995 - 00:00:00 CEST

Original text of this message