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: archivelog mode switch logfile statement

Re: archivelog mode switch logfile statement

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Tue, 5 Feb 2002 06:20:41 +1100
Message-ID: <3c5edf15$0$18469$afc38c87@news.optusnet.com.au>


You are supposed to do it once per tablespace (according to Oracle) not because of the need for archives to be produced, but because of the need to re-synchronize the SCNs of the datafile headers. Your tablespace has been in hot backup mode, so it's SCN has been frozen behind that of all other files. Were you to experience a crash at this point, Oracle would assume that this particular file requires recovery. It doesn't of course, and a quick 'alter database datafile X end backup' is sufficient to resolve the issue, but most people panic and start restoring files and applying redo unnecessarily. A log switch is intended to avoid the possibility altogether by forcing re-synchronisation.

However, I don't actually believe it's worth going to the bother myself. If you just wait long enough, a new checkpoint will be issued by the system itself at some point, and re-synchronisation will take place all on its own anyway. And if you practice querying from v$backup whenever Oracle informs you that a file needs media recovery, you'll avoid doing unnecessary recoveries.

So whilst the advice is there in the Oracle manuals, its not advice I actually recommend.

Incidentally, there's no real point in doing it for archiving reasons, either. It always looks like there is because people see "a" backup as a static one-off event... but it's a regular event, and a continuing one, so what archives you fail to pick up tonight will get included in tomorrow's backup, and so on, without an extra log switch in sight.

Regards
HJR "obakesan" <cjundieseastwd_at_powerup.com.au> wrote in message news:H3x78.7176$T4.68591_at_nnrp.gol.com...
> HiYa
>
> according to what I have read, when doing archive log based hot backups,
one
> should do an alter system switch logfile at the end of the backup. I
understand
> that this is to flush the redo log files so one can backup all the
relevant
> transactions together.
>
> What I have trouble with right now, is how often should I issue this
command??
> According to HJR's document once per table space. Is this right? Other
sources
> have suggested (so I have noted on google searching) to only do it after
the
> SYSTEM tablespace is backed up, and to make sure that that one is backed
last
> too.
>
> Why? What is wrong with making only one statement alter system switch
logfile at
> the end of the backup procedure, just to flush out the last of the files?
Surely
> the archiver process will be shunting stuff out as it fills anyway?? Are
there
> seperate logfiles for each tablespace??? (I didnt think so)
>
> Yours befuddled
>
>
> thanks again
>
>
> See Ya
>
> --
> (when bandwidth gets better ;-)
>
> Chris Eastwood
> Photographer, Programmer, Motorcyclist and dingbat
>
> please remove u n d i e s for reply
Received on Mon Feb 04 2002 - 13:20:41 CST

Original text of this message

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