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: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: Wed, 1 Sep 2004 12:57:01 +0100
Message-ID: <4135b907$0$20247$cc9e4d1f@news-text.dial.pipex.com>


"Bob Jones" <email_at_me.not> wrote in message news:RdaZc.15307$eD5.829_at_newssvr22.news.prodigy.com...
>
> "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.
> >
>
> Okay, let's see who is posting nonsense here.

I suspect you will find that it is your advice above that is probably incorrect, and that Howard's approach is exactly correct - I personally don't like the word nonsense. Just to reiterate Howard's point USING BACKUP CONTROLFILE means I have lost my controlfiles, I don't have/can't write a create controlfile statement and so I'm going to have to restore a backed up controlfile.

IF you want to recover to a 'point of your desire' then you would use the UNTIL TIME clause (or if you are amazingly clever the SCN version UNTIL CHANGE , but I think that unlikely outside of labs).

> > 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.
> >
>
> How do you know it was not an option for OP to use a backup controlfile?
The
> only thing he asked for was to apply achive logs to a cold backup.

Well we don't which is why Howard didn't offer specific advice - other than to say correctly that you apply archives during a recovery - this rather leaves it open to the OP to explain his failure scenario. The correct recovery process depends on what has happened (and to coin a phrase on where  you want to go today). Until we know that offering advice is a bit premature.

>
> > 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.
> >
>
> Again, you are jumping to conclusion without fully understanding OP's
> situation. I am puzzled by the use of word "unnecessary". If the clause
and
> resetlogs are unnecessary, why are they even there.

because *under some circumstances* they maybe necessary (though using backup controlfile isn't necessary to recover to a given point in time). why is the FROM LOCACTION clause there? because it *might* be neccesary.

> I would rather let OP
> decide what is necessary or unnecessary. If he wants to apply archive logs
> to a cold backup, maybe he doesn't care about massive downtime.

How much downtime you experience does not depend on the nature of the backup. If I hot backup my database 3 months ago and keep all my archive log, I'll have a longer recovery time than if I cold backup my db each night and keep my archive logs.

>
> > 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'.
> >
>
> At no point he said anything about missing a file. He simply want to apply
> archive logs to a cold backup and I gave him a direct answer.
>
> > If you don't know how to recover a database, that's fine. But don't
> mislead
> > others who are looking for assistance, OK?
> >
>
> Please explain how I mislead people by giving such a simple direct answer
to
> a simple question. I think nothing is more misleading than providing
answers
> irrelevant to the question.

Because the USING BACKUP CONTROLFILE clause is not a requirement for all recoveries and using it willy nilly is extremely unhelpful. I am aware of a company that has no fully qualified dba that suffered a power outage to the db server. When the db came backup the db didn't start. The alert log had 'file x requires media recovery'. Because the person in charge of the db *sort of* knew what they were doing they restored all datafiles (and possibly controlfiles) from a rather old backup and typed RECOVER DATABASE <some clause here they found in an online forum>. They didn't have all archived redo logs available. Now there are clearly a bunch of lessons for that company here, but one lesson we as dbas can draw is don't use unnecessary RECOVER statements, find out what the issue is. My best guess is RECOVER DATABASE; ALTER DATABASE OPEN; would have worked just fine. So I agree with your last statement nothing is more misleading than giving irrelevant answers USING BACKUP CONTROLFILE is however at least potentially misleading (we don't know if it is necessary or not) but if it *is* unnecessary it is potentially hugely damaging.

-- 
Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com
Received on Wed Sep 01 2004 - 06:57:01 CDT

Original text of this message

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