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: Hot Backup and Recovery - When to switch log files.

Re: Hot Backup and Recovery - When to switch log files.

From: Paul Drake <drak0nian_at_yahoo.com>
Date: 13 May 2004 07:11:24 -0700
Message-ID: <1ac7c7b3.0405130611.27301868@posting.google.com>


"Howard J. Rogers" <hjr_at_dizwell.com> wrote in message news:<40a27562$0$31367$afc38c87_at_news.optusnet.com.au>...
> willy_gates wrote:
> > Hello all
> >
> > I am testing my hot backups. (Oracle 9i)
> >
> > The test I am having trouble with is simulating our office burning down
> > losing the live server and all mutiplex points.
> >
> > This leaves me with a tape containing
> >
> > * backup (binary and scripted) control files from the night before the fire,
> > * archived redo up to the night before the fire,
> > * backup init files from the night before the fire,
> > * All data files from the night before the fire.
> >
> > But when I try to:
> >
> > SQL> Recover database using backup controlfile until cancel
> >
> > I am prompted for archive logs 1_338 which I have as part of the backup and
> > 1_339 which has not yet been created.
>
>
> Not surprisingly, really, is it? There you are, issuing a 'using backup
> controlfile' command, which Oracle interprets to mean "God knows when
> this binary controlfile was last updated, so please ignore most of what
> it contains", and now you suddenly want Oracle to say "Ah, yes, but the
> details it's got on which archives are available are totally accurate".
>
> It's a bit of a contradiction, no?
>
> In short 'using backup controlfile' (which is the correct thing to do in
> your scenario) means 'I am taking charge of telling you things like what
> archives are available because the control file I'm using is unreliable
> about that sort of stuff'... so you then have to actually be brave and
> do precisely that. Issue the cancel command when it prompts for an
> archive you know you haven't got, and then open resetlogs.
>
>
> I can substitute the correct redo log
> > (tested but not possible as the office has burnt down and I do not have a
> > redo backup) or I suppose I could cancel at this point (not tested).
> >
> > This is my hot backup script:
> >
> > for all tablespaces
> > {
> > alter tablespace c1.ts begin backup;
> > copy data file to tape
> > alter tablespace c1.ts end backup;
> > }
> >
> > alter system switch logfiles (??? Is this in the correct place ???)
>
> It's fine.
>
>
> Regards
> HJR
Howard,

IIRC, you want to have (at least) the archived redo log from when the backup controlfile was created, meaning, switch the log file after creating the backup controlfile.

As switching the logfile before creating the backup controlfile doesn't really do anything additional, I'd just switch it after and make sure that log is available during recovery.

A test exercise is in order (of course).

Paul Received on Thu May 13 2004 - 09:11:24 CDT

Original text of this message

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