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: recover database using backup

Re: recover database using backup

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Thu, 12 Feb 2004 10:17:32 +1100
Message-ID: <402ab80e$0$18304$afc38c87@news.optusnet.com.au>

"Reid L Maier" <rlmaier_at_ingr.com> wrote in message news:b2ea51db.0402111457.787a8d43_at_posting.google.com...
> I'm trying to do some automation by placing a set of Oracle commands
> into a DOS batch file. The "recover database using backup
> controlfile;" statement generates a prompt asking for the name of a
> logfile. Provided I know the name of the logfile, is there a way to
> prevent the prompt? Perhaps I can set an internal variable with the
> known logfile name and have the statement execute without the prompt?
>
> I've asked this question before but the only response I received was
> to 'set autorecovery on'. That doesn't explain which variable needs
> to be set with the name of the logfile name nor how to set it.
>
> Any help is appreciated.
>
> Reid

First off, don't try and automate recoveries. They can't be automated for the simple reason that every one of them has different causes, and needs to be approached from a different angle accordingly.

Second, I don't understand your question. You can do 'set autorecovery on', and that will work. Or you can do 'recover automatic database using backup controlfile'. Both achieve the same thing: Oracle will assume that what it suggests as the archive log name to use for recovery is the correct one, and won't therefore actually both to prompt you. You seem to be suggesting that Oracle's proposals are actually incorrect for some reason (otherwise, why not use set autorecover?), and that you know better. But why would that be the case? The only situation I can think of is where you have moved the archives to some new location, so that they are no longer where Oracle originally put them. *If* that was the case, then you can fool Oracle into using that new location by changing the values for LOG_ARCHIVE_DEST or LOG_ARCHIVE_DEST_n, depending on you version and licence. Dynamically, you can issue the command "alter system archive log start to 'xxxxxx'", and that will persuade the recovery process to look in "xxxxxx" for the archives. Combined with recover automatic... you could then achieve an automated recovery with archives in the "wrong" place.

Thirdly, I hope you aren't just throwing "with backup controlfile" in there for no good reason. You only need it when you have actually restored a binary backup of your controlfile -and then the question becomes 'why did you do that?', because there should never be a need to.

I'd like to know more about what you are attempting to do, and why you think this is a good way of going about it, before offering any further advice.

Regards
HJR

-- 
--------------------------------------------
Oracle Insights: www.dizwell.com
--------------------------------------------
Received on Wed Feb 11 2004 - 17:17:32 CST

Original text of this message

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