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: Shutdown Abort and Backup

Re: Shutdown Abort and Backup

From: Quinton McCombs <quintonm_at_bellsouth.net>
Date: 1998/03/03
Message-ID: <34FC27E3.A6C346ED@bellsouth.net>#1/1

Lets put aside operating system buffers for the purpose of this discussion...

When you issue a commit in oracle, commit complete is not returned to the user until the redo log buffer has been flushed to disk. At this point your commited transaction is on disk but not in the datafiles. Let's also assume that a check point has not been done for the past hour and DBWR has not had a need to free up space by writting dirty buffers out.

Shutdown immediate will cause all uncommitted transaction to rollback, kill all users, and flush the buffers to disk. Shutdown abort is IDENTICAL to instance failure. Instance failure is handled by the online redo logs and makes NO DIFFERENCE whither you are in noarchivelog or archivelog mode.

After an instance failure, starting the database will cause INSTANCE (not database) recovery to begin automatically. Instance recovery will apply all redo information to each datafile to bring the SCN numbers into sync again. It will then rollback all uncommitted transaction. Actually the rollback is deferred to speed recovery time but....

With this mechanism, shutdown abort followed by a cold backup will not hurt anything. It will only cause the instance to be recovered after starting up. Granted, if the database was in the middle of a very long update when the shutdown abort happened the total recovery time will be twice the time of the update when the database is restarted. For this reason, it is not such a good idea to shutdown abort for a backup.

Why would you really want to do a shutdown abort before a cold backup? Shutdown immediate takes a bit longer but it works just as well. Anything that would stop the shutdown immediate from working is a probabley worth investigating. Besides, the instance will recover assuming that everything goes as it should. You will always be introducing extra risk with shutdown abort.

Marcel Kates wrote:
>
> Here's my guess. For the case where the box is powered off before Oracle is
> shut down, it is possible to have transactions still in the buffers and not yet
> written. These are lost. For the case where you do a shutdown abort,
> transactions in progress are terminated immediately therfore all the updates
> needed to a variety of table to maintain data integrity may not be written. The
> databse will be restartable but the data may be inconsistent. If you shut down
> the database in an orderly manner, transactions complete and all buffers are
> flushed.
Received on Tue Mar 03 1998 - 00:00:00 CST

Original text of this message

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