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: simple backup question...

Re: simple backup question...

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Thu, 27 Mar 2003 04:20:03 +1100
Message-ID: <H8lga.355$1s1.3045@newsfeeds.bigpond.com>


"Tim Smith" <timasmith_at_hotmail.com> wrote in message news:a7234bb1.0303260355.399c1bd9_at_posting.google.com...
> Is it valid to do this:
>
> alter tablespace ts begin backup;
> ## os backup of datafile1
> alter tablespace ts end backup;
> alter tablespace ts begin backup;
> ## os backup of datafile2
> alter tablespace ts end backup;

Yes, it's valid, but as written, it's a bit daft. The begin backup command locks the datafile headers for the entire set of tablespace datafiles, so that they cannot be updated by CKPT. It also causes the entire tablespace to start generating block-level redo the first time a DML statement affects any of the blocks within any of the datafiles. So your first 'begin backup' means that datafile 2 is immediately locked and doing block-level redo... so you might as well start copying it at the O/S as well.

Worse, 'begin backup' causes a checkpoint to be issued against the entire tablespace -meaning that any dirty buffers floating around the buffer cache that live in this tablespace are flushed to disk, regardless of which particular datafile they reside on. Therefore, your example is causing two checkpoints to take place. And extra checkpoints make for poorer performance.

Where this approach might have merit, however, is if there is a dirty great temporal dislocation between the first and second 'begin backup's... ie, your datafiles are so enormous that you have to back one of them up on Monday evening, and the second on Tuesday evening. If your maintenance window is such that a complete backup of the tablespace in one go is not possible, then yes, you can put the entire tablespace into backup mode, and proceed to only back up part of it.

Regards
HJR Received on Wed Mar 26 2003 - 11:20:03 CST

Original text of this message

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