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: benefits of multiple switch logfile calls?

Re: benefits of multiple switch logfile calls?

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Fri, 5 Dec 2003 07:58:07 +1100
Message-ID: <3fcf9fe1$0$13968$afc38c87@news.optusnet.com.au>

"Don Seiler" <don_at_seiler.us> wrote in message news:pan.2003.12.04.20.02.44.323658_at_seiler.us...
> On Fri, 05 Dec 2003 06:46:13 +1100, Howard J. Rogers wrote:
> > It also explains why the original poster complains about the recovery
> > process using redo from a time after the backup completed: because the
> > restored controlfile has no idea when to stop recovering, because it is
> > itself out of date.
>
> That's me! I realize that ignorance is no excuse but when I came onto
> this job that is how I was told to do the copies. My revised orahot
> script (mostly found online here) does backup the control file to trace,
> and has these instructions:
>
> # If you need to clone the entire database, load the *exact same* Oracle
> # software binary image, restore the contents of the backup, then edit
the
> # file named "ora*.trc". Remove everything except for the "CREATE
CONTROLFILE",
> # modify the paths if necessary, then enter svrmgrl (or sqlplus on 8i+),
> # do a "startup nomount", then run the "CREATE CONTROLFILE". After a
delay,
> # do a "RECOVER AUTOMATIC DATABASE;" and after another delay, enter
> # 'ALTER DATABASE OPEN;' and your database should come online. Also make
> # sure that you've renamed the "do-not-use*" redologs to working paths.
>
> That last sentence refers to the fact that it copies the redo log files
> (as listed in v$logfile) and prepends "do-not-use-" to the copied files.
>
> I realize this question warrants an "RTFM", but are these pretty solid
> instructions.

Any set of instructions that goes to the effort of copying the online logs, and then renaming them to point out that the copies should never be used, are not "solid". Another 6-letter word beginning with 's' and ending in 'd' springs to mind. Not your fault, I realise.

>I'll probably try to train myself to do things the right
> way instead of the way the DBA-on-the-way-out-the-door told me.
>
> Also, Howard, you think that just the ALTER SYSTEM ARCHIVE LOG CURRENT;
> statement is enough? Does it matter if we do it before or after backing
> up the control file to trace?

It makes no difference. The controlfile trace script cheats. It re-creates the controlfile empty; it then populates the controlfile with pointers to where all the data files and online redo logs are. It then hares off down those pointers to read the SCN in the header of each datafile. It takes the highest SCN it finds, and writes that into the SCN of the new controlfile. It then uses that as the basis for performing recovery. Therefore, it is irrelevant when you take the tracefile backup, because the new controlfile starts virgin and uses the existing state of the surviving components of the database as a way of reconstructing itself.

Regards
HJR

-- 
------------------------------------
Oracle insights at www.dizwell.com
------------------------------------
Received on Thu Dec 04 2003 - 14:58:07 CST

Original text of this message

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