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: Crazy mistake in "Oracle Unleashed"

Re: Crazy mistake in "Oracle Unleashed"

From: Jeremiah Wilton <jeremiah_at_wolfenet.com>
Date: Wed, 30 Sep 1998 14:38:33 -0700
Message-ID: <Pine.OSF.3.95.980930135959.21140B-100000@gonzo.wolfenet.com>

If Oracle Education is teaching such a thing (that datafiles are not written during hot backup) they are making a big mistake.

Imagine the amount of time that would be required to come out of backup mode if all the changes got "diverted" from the datafiles and were then re-applied at the END BACKUP command. The difference between normal operation and hot backup mode for a tablespace can be summed up very simply:

Datafile headers are frozen and full block images are logged to redo.

Here is how logical consistency is maintained:

The files you copy during hot backup are inconsistent with respect to a given point in time, *because people are changing them.* Even the database blocks can be fractured, containing some blocks from before a particular database write and some from after.

During a recovery, this inconsistency is resolved by applying the full block images that were logged to the redologs during backup. Archived redologs are not read by an open, running Oracle instance that is not recovering. Archived redologs are only used for recovery.

If no writes were made to datafiles during hot backup, how could you come instantly out of backup mode after hours of activity in a backing-up tablespace? If no writes were made to datafiles during hot backup, how could you simply issue an "ALTER DATABASE DATAFILE 'nnn' END BACKUP;" command before crash recovery, and continue on merrily?

The most thourough discussion of this mechanism that I have encountered in an Oracle book (that is not erroneous on this topic) is in the "Oracle8 Backup and Recovery Handbook" by Rama Velpuri and Anand Adkoli, from Oracle Press, ISBN 0-07-882389-7.

Best of luck,
--
Jeremiah Wilton http://www.wolfenet.com/~jeremiah

On Wed, 30 Sep 1998, John P. Higgins wrote:

> Think about the backup of a large tablespace (several 2GB files) while
> updating. Several REDO logs may be created (and archived (and overwritten)
> ) during the backup. How could Oracle read the REDO logs at then end of
> the backup?
>
> John Durst wrote:
>
> While putting a tablespace in backup mode does alter
> the generation of redo to
> include entire blocks for that tablespace, that doesn't mean the DBWR
> process stops writing to the datafiles.
>
> satar_at_my-dejanews.com wrote:
>
> > read my post...Modified blocks are written to the REDO LOGS. After
> > the END BACKUP is issued and at the next log switch, the changed
> > blocks are then updated in the datafiles. It is such an easy concept
> > to grasp, yet so many DBA's are confused about this procedure. Maybe
> > I'm wrong, but I would hate to believe that I paid $1400 dollars to
> > Oracle Education to mislead me on Backup and Recovery.
Received on Wed Sep 30 1998 - 16:38:33 CDT

Original text of this message

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