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: Online backup: Backup online redologs?

Re: Online backup: Backup online redologs?

From: Howard J. Rogers <howardjr_at_www.com>
Date: Wed, 28 Mar 2001 18:39:14 +1000
Message-ID: <3ac1a344@news.iprimus.com.au>

"Vikas Agnihotri" <onlyforposting_at_yahoo.com> wrote in message news:ata1cts3d70qan0bkbo9oa94i2eccsd0bd_at_4ax.com...
> Kevin Loney's Oracle 8 DBA handbook mentions the following 3-step
> process for a online/hot backup:
>
> 1. Backup each tablespace by putting it in backup mode
> 2. Backup the archived redologs (and optionally delete them to save
> space)
> 3. Backup the controlfile using ALTER DATABASE BACKUP CONTROLFILE
>
> Why is there no mention of the online redologs?

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRRRRRRRRRRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGGGHHHH
HHHHHHHHHHHHHHHHHHHHHH!

I don't beleieve this.
This was discussed at ENORMOUS length just last week. Don't you ever scan other posts before sending off your own??

Really.

OK. <calm>.

The basic rule in Oracle is this: you can't copy anything hot unless you've a mechanism for making it consistent subsequently, because all hot copies will be internally one big mess. Different bits copied at different times.

Datafiles copied hot will be inconsistent. However, if you apply redo to datafiles, they become consistent, and can then proceed to be rolled forward to whatever time (read: SCN) you choose.

Controlfiles copied hot will be inconistent. And you can't apply redo to controlfiles. So they can't be made consistent... but fortunately, the 'alter database backup controlfile to 'c:\blah\control01.bkp'" command makes Oracle do the copying, and when Oracle is in charge it can use tricks and techniques to guarantee the output will be read consistent. (Woe betide you, however, if you *ever* do a simple O/S copy of a hot controlfile, because it will be unuseable).

Redo Logs copied hot will be inconsistent. And you can't apply redo to redo logs. So they can't be made consistent.... and UNfortunately there is no 'alter database' command that will generate consistent copies. So any hot copies of redo logs will be inconsistent, will always be so, and will thus be totally unuseable.

And then there's this: think about it. If you are in archivelog mode, you *do* have a consistent copy of the redo logs in the archive log (which is 'cold' the second it is written). So by backing up the archivelogs, you are in effect backing up consistent copies of the online redo logs. The only exception is the CURRENT redo log, which is hot, hasn't been archived, and cannot be O/S copied. This is the potential achilles' heel of the Oracle database. Loss of the current log will result in data loss -but that's why redo log mirroring was invented, to make the potential total loss of the current log extremely unlikely.

>During BEGIN BACKUP,
> arent the changed blocks written to the online redologs (in addition
> to the datafiles themselves)? So, if my entire backup is over before
> the online logs cycle, my online backup will be missing the changes
> generated during the backup since they are present only in the online
> redologs, right? What am I missing?
>

You are missing the usual recommendation from Oracle, which is to issue an 'alter system switch log file' command at the end of each tablespace's spell in hot backup mode.

 > And if the online redologs should indeed be backed up, shouldnt there
> be a BEGIN BACKUP for them as well since they are in a state of flux?
>

See above. It makes no sense to backup the online redo logs. They've already all been backed up to the archives, with the exception of the current log. If you are that concerned, then a switch log file will cause that to be archived, and by backing up that last archive, you've got the lot.

Regards
HJR
> Thanks...
Received on Wed Mar 28 2001 - 02:39:14 CST

Original text of this message

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