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: recovering from archived redo logs

Re: recovering from archived redo logs

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Sat, 1 Dec 2001 09:20:26 +1100
Message-ID: <3c080620$0$7488$afc38c87@news.optusnet.com.au>


Comments below.
HJR

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


"simon" <simon_at_publishers-market.com> wrote in message
news:BMIN7.2$WE4.2563_at_news.ecrc.de...

> Hi,
>
> If I make a ALTER SYSTEM ARCHIVE LOG CURRENT, then copy all archived logs
> to another machine with earlier copied datafiles/current redo logs, IN
> THEORY surely I should have enough redo to fully recover. In practice, I
> seem to be able to do this if I have the above plus:
>
> 1. a copy of a current control file (or a (binary) backup controlfile),
> Doesn't matter if I don't have current copies of redo logs because all the
> redo is in the archives.
>
No it's not. I know it looks like it should be, but you're shooting a moving target: as soon as you archive the current log, a new log becomes current, and that receives the new redo. Archive that one, and the next becomes current. And so on... so you are always going to be missing the current log (whichever one it happens to be), which happens to contain (after a clean shutdown) the end-of-log marker. Without that, Oracle *must* perform an incomplete recovery... even if that current log doesn't have any 'real' transactions in it.
> or
>
> 2. Copies of CURRENT redo logs and I rebuild control file from a trace
> control file. Oracle seems to get highest SCN from current logs when it
> rebuilds the control file, so it says 'aha, SCN in data files is below
that
> in the archived logs, recovery needed.'
>
> But f i don't have current redo logs and try rebuilding a control file
from
> a trace copy, I can't recover at all.
>
Well, in the interests of resolving your worries, I just blew away all my control files and all my redo logs (I hope you are suitably grateful!). I ran the trace script, and got my three control files back. But then things went pear-shape, because the lack of the current redo log meant Oracle wants and needs to perform an *in*complete recovery -which requires that all datafiles be restored from backup. So the line in the trace script that says 'recover database' produced the error: ORA-01194: file 1 needs more recovery to be consistent ORA-01110: data file 1: 'D:\ORACLE\ORADATA\HJR816\SYSTEM01.DBF' ...which is the classic indication that an incomplete recovery is required. No problems: I've got my control files back anyway, so now I can do a shutdown immediate, restore all data files, and then issue the command: recover database until cancel. Halt the recovery when it wants to apply the current log, and *then* 'alter database open resetlogs'. Voilà: database functional. Took me two passes to get it working, and I guess I could have done it all in one by editing the tracefile script to say 'resetlogs' and 'recover database until cancel', and remembering to pre-restore all my data files, but the point is, recovery is possible: and its an incomplete recovery because of the loss of the current redo log, which can never be archived. Regards HJR
> In theory, it seems to me that all the redo required is in the archived
> logs, so I should be able to say 'rebuild a control file from the trace
> file, ignore the SCN in the 'old/invalid current redo log, but get the SCN
> from the archived redo logs, so that I can recover.
>
> Im new to Oracle - \would appreciate it if some DBA could point out error
> in my thinking.
> thanks
> Simon
> --
> Simon Hume
> Publishers Market AG
> Lindwurmstrasse 129a
> D-80337 München
>
Received on Fri Nov 30 2001 - 16:20:26 CST

Original text of this message

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