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: Applying archivelogs to a cold backup - shortcut?

Re: Applying archivelogs to a cold backup - shortcut?

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Mon, 19 Nov 2001 19:32:11 +1100
Message-ID: <3bf8c2f8$0$13483$afc38c87@news.optusnet.com.au>


Oops, that will teach me to slow down and read more carefully.

You're doing an incomplete recovery (...until cancel) and you're using a backup controlfile. Both will require you to issue an 'alter database open resetlogs' when all the available archives have been applied. That in turn requires you (if you've got any sense) to then perform an immediate shutdown, followed by a new closed database backup (resetlogs renders all prior backups and archives useless).

If you follow the advice in my earlier message, and issue the 'auto' command when first prompted for an archive to apply (or the 'recover automatic database until cancel') then the first run through will apply, let us say, 800 logs -and then bomb out, because the 801st log (presumably the current redo log) is missing (I presume that's why you're doing an 'until cancel' recovery anyway.... let's hope so). That's OK: when the recovery process fails to locate log 801, it will crash out horribly: you just start it up again, issue the 'recover database until cancel' command once more, and this time the first log it prompts for will be the missing one -so *now* you type 'cancel', and that terminates recovery. Next comes your alter database open resetlogs, and then the shutdown and new backup.

Excuse me for asking, though: what kind of a database is it that forces you to restore a backup from over 800 logs ago? Either you are backing up every night (in which case 800 log switches implies your redo logs are hopelessly small), or you are backing up once in a blue moon -in which case, one wonders whether a slightly higher frequency of backups might be in order!

Regards
HJR

--
Resources for Oracle: http://www.hjrdba.com
===============================


"Night Shade Books" <jasonw_at_nightshadebooks.com> wrote in message
news:B0D1A1C21BAAEC7E.BD12F7BB388255DC.4EAA8B54226781A6_at_lp.airnews.net...

> Hi all,
>
> I've lost a database. Disk went bad. Ouch.
>
> So anyway, I have a cold backup of that db. I restored it, and now want
> to apply the archivelogs to it.
>
> So I started with a 'alter database recover until cancel using backup
> controlfile;'
>
> After that, Metalink tells me to do a 'alter database recover continue
> default;'
>
> The only problem is, that seems to apply one log, so I have to execute
> that statement once per archivelog. I've got 800+ archive logs to apply,
> and this could take a very long time if I've got to do each one by hand.
>
> Is there an automatic way to do this? I'm on Oracle 8.1.8 / Solaris
2.8.
>
> Jason
>
>
Received on Mon Nov 19 2001 - 02:32:11 CST

Original text of this message

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