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: How to apply archive logs on an cold backup

Re: How to apply archive logs on an cold backup

From: David Fitzjarrell <fitzjarrell_at_cox.net>
Date: 1 Sep 2004 13:29:07 -0700
Message-ID: <9711ade0.0409011229.2cfafe6@posting.google.com>


Comments embedded.

tim.kearsley_at_milton-keynes.gov.uk (Tim Kearsley) wrote in message news:<725736ef.0409010027.32153fa8_at_posting.google.com>...
> Depending on what was behind the OP question, I'm not sure that Bob
> was writing "complete nonsense".
>
> A few "ifs":
>
> 1) If you have a database in ARCHIVELOG mode and

You then have available archived redo logs to apply.

> 2) If all you have available is an old, cold backup and

With all datafiles in synch with the controlfiles from that backup.

> 3) If you have all archive logs available since your old, cold backup
> and
> 4) If you have a control file creation script (e.g. the output of a
> BACKUP CONTROLFILE TO TRACE)
Which creates a new controlfile, with all of the SCN's from the cold, sychronised backup. Nothing is 'out of whack' between the datafiles, so even your backup control file won't include any of the SCN's in your archived redo logs dated after your old, cold backup.

>
> then you can recover your database back to the current point in time
> by issuing a RECOVER DATABASE USING BACKUP CONTROLFILE... can't you?
>

You've already recreated your controlfiles with a script, so all of the SCNs in your datafile headers have been written to your new controlfiles. RECOVER DATABASE USING BACKUP CONTROLFILE should find no discrepancies between the SCNs in your new controlfiles and the datafiles used to create them, so it may also state that no recovery is necessary. Also, it requires the use of ALTER DATABASE OPEN RESETLOGS. Using RECOVER DATABASE UNTIL TIME ... would, in the case you've described, enact a proper recovery. Using RECOVER DATABASE UNTIL CHANGE ... would also enact a proper recovery, neither of which require a resetlogs afterwards. However you are NOT restoring controlfiles from backup, you are creating entirely new ones. Since you have no backup controlfiles this option is not the proper one for such a restoration. Which does not say you CANNOT use it, just that you shouldn't.

> A lot of "ifs" I know, but the principle is sound I believe, and I
> have done it myself on one occasion.
>
> Regards,
>
> Tim Kearsley
> HBS
> Milton Keynes Council
>
> "Howard J. Rogers" <hjr_at_dizwell.com> wrote in message news:<41351d6f$0$9811$afc38c87_at_news.optusnet.com.au>...
> > Bob Jones wrote:
> >
> > >
> > > "robson" <dbanewbie_at_yahoo.com.br> wrote in message
> > > news:514f866a.0408311326.68c5d22d_at_posting.google.com...
> > >> i have the database with archive log and one cold backup.
> > >> how to apply archive log in cold backup?
> > >>
> > >> thanks,
> > >> robson
> > >
> > > You can specify "RECOVER DATABASE...USING BACKUP CONTROLFILE". This will
> > > allow you roll forward to a point of your desire.
> >
> > Please don't post complete nonsense.
> >
> > The 'using backup controlfile' clause should only be specified if that's,
> > strangely enough, actually what you're using. Unless he restores his
> > control files from backup, it would be lunacy to use the clause.
> >
> > Never mind that an unnecessary use of the clause requires an unnecessary
> > resetlogs, with all the massive downtime and requirement to re-backup the
> > database that brings.
> >
> > If he loses one DBF, replace that DBF and issue just plain old 'recover
> > datafile X'. If he loses multiple DBFs, restore those DBFS and issue a
> > plain old 'recover database'. If he loses all his control files, then
> > restore the control file and issue a 'recover database using backup
> > controlfile'.
> >
> > If you don't know how to recover a database, that's fine. But don't mislead
> > others who are looking for assistance, OK?
> >
> > HJR
David Fitzjarrell Received on Wed Sep 01 2004 - 15:29:07 CDT

Original text of this message

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