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: Backup questions

Re: Backup questions

From: Howard J. Rogers <howardjr_at_www.com>
Date: Thu, 22 Mar 2001 20:30:47 +1100
Message-ID: <3ab9c653@news.iprimus.com.au>

"Bruno Jargot" <bjargot_at_club-internet.fr> wrote in message news:6a2jbtg8mn022e4t88ns2db4n2oj9ehac0_at_4ax.com...
> On Wed, 21 Mar 2001 23:19:19 +0100, Matthieu Darnet wrote:
>
> ><vikasa_at_despammed.com> a écrit dans le message news:
> >sl2ibt4pm54th4q8ig5be9jlcghs3luppb_at_4ax.com...
 

> >> 1. During online backup, when a tablespace is marked as BEGIN BACKUP,
> >> any changes to that tablespae are recorded in the redologs.
>
> and in the datafiles.

Woo Hoo! At least *someone* has read the documentation! Thank you, Bruno!

>
> >>When the
> >> END BACKUP is issued, does Oracle read the redologs and apply these
> >> changes to the actual datafile(s) of the tablespace? Or does it just
> >> stay in the redolog?
> >When the END BACKUP is issued, all the changes made during backup are
> >applied on the tablespace.
>
> No
> I don't know how it exactly works but,

It works because the Redo system now generates complete before and after images of the entire *block*, instead of the ordinary before and after images of the pieces of data undergoing update. In other words "update emp set sal=900 when name='Bob'" would ordinarily generate two entries of 'rowid 800' and 'rowid 900' (ie, a few bytes of data). But in hot backup mode, that same update generates an entire 8K image of the block (assuming 8K blocks, of course) both before and after.

Therefore, we have all the information needed to construct the entire block, regardless of the order in which the operating system grabs the O/S blocks of which an Oracle block is comprised.

The operating system 'copy' command will proceed to create something that *looks* like a regular dbf file, but internally, it will be a mess. Different bits of an Oracle block will have been copied at different times, depending on which O/S block was whizzing past the disk head at the time. Only block level redo will allow us to construct a consistent image of an Oracle block. And if we can make an inconsistent Oracle block look consistent by applying the relevant bits of the redo stream, then we can do the same for an entire data file (since it is simply composed of a bunch of Oracle blocks).

Incidentally, RMAN approaches the task from an entirely different angle. Being an Oracle utility, it can spot when an Oracle block is undergoing change, and it simply keeps retrying the copy command against that block until all changes have finished. So it knows when an Oracle block is consistent, and copies it whole when it is. Accordinly, RMAN does hot backups without generating vast quantities of extra Redo, and that is perhaps the over-riding reason why people should switch from O/S hot backups to their RMAN cousins.

Regards
HJR
>when a tablespace is in backup
> mode, the datafiles of the tablespace are stil modified so there is no
> need to apply redolog.
> If a restore is required, Oracle will be able to synchronize the
> datafiles with the redolog.
Received on Thu Mar 22 2001 - 03:30:47 CST

Original text of this message

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