Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Archive log-switch after on-line backup

RE: Archive log-switch after on-line backup

From: David Barbour <>
Date: Fri, 27 Oct 2000 11:31:28 -0500
Message-Id: <>


I think you're confusing archive logs and redo logfiles. After you're done backing up your tablespaces, you then perform an archive log switch. This flushes out any redo information left in the logfiles that may have accumulated during your backup to archive. The next redo logfile then becomes active, but won't start archiving until it fills up and switches to the next member.

The archive file created after the switch, in conjunction with the archive log you should have created at the beginning of your backup, plus any written during the backup, contain all the information you need to restore your database, you don't need the 'current' one, except for rollforward from the backup.

By making the list of archive files immediately after performing the switch, you will capture the filename of the latest file(generally before it finishes writing to disk - hence the sleep). By using a list, rather than just moving all the files, you avoid the exact problem you're experiencing. If it's the only archive file in the archive destination(highly unlikely in all but one of my DBs), I don't want it to move anywhere until Oracle is done writing the logfile to disk.

I've restored and copied databases successfully many times using this approach, and (knock on wood), haven't had a problem yet.

David A. Barbour
Oracle DBA - ConnectSouth

-----Original Message-----
From: Eric Lansu [] Sent: Friday, October 27, 2000 2:16 AM
To: Multiple recipients of list ORACLE-L Subject: Re: Archive log-switch after on-line backup

Thanks for the url, but it's no help to me. What's in it isn't even correct!

First, my problem is that after a log-switch there is a veeery small start (512 bytes) of the current log as an .arc-file written to disk. If I move the files, I move this one too! Oracle keeps getting into a stress for it cannot find the .arc-file anymore....

What's wrong in the url-document you stated is;

Stephen Rea tels us to perform a 'archive log next', and then copy the files. This only writes the last FULL achive-log to disk. After doing a backup you want the CURRENT one, so you issue a 'archive log current'

Please correct me if I'm wrong....

Eric Lansu

> Here you are the nice url ;-)
> Radu Caulea
> On Thu, 26 Oct 2000 07:35:24 -0800, you wrote:
> >Eric,
> >
> >I also use an archive log switch. To avoid the situation you're
> >experiencing, I added a short "sleep" after the logfile switch to allow
> >(hopefully) my switched logfile to at least begin archiving. I then make
> >quick list of the files in the archive directory and use this list to
> >determine which archive logs to copy and delete.
> >
> >The command I use for listing is:
> >
> >ls /oracle/leads/redo/arch/*.ARC >logfile.lst
> >sleep 10
> >cat logfile.lst |
> >sed "s/\(.*\/\)\([^\/].*\)/mv \1\2 \/home1\/orabackup\/`date
> >+%b%dleads`\/\2/" >logfile.shl
> >sh logfile.shl
> >
> >The second "sleep" in this puppy is to allow the archive log to finish
> >archiving (hopefully) before the copy (move) process begins.
> >
> >I got this command from a white paper I found on the web after a
> >conversation about this very problem last year. I think perhaps Rachael
> >Carmichael looked over my previous script and suggested an improvement.
> >
> >Sorry, I don't have the URL.
> >
> >Hope this helps.
> >
> >
> >
> >David A. Barbour
> >Oracle DBA - ConnectSouth
> >512-681-9438
> >
> >
> >-----Original Message-----
> >Sent: Thursday, October 26, 2000 5:25 AM
> >To: Multiple recipients of list ORACLE-L
> >
> >
> >Dear listers,
> >
> >I have a problem in one of my 8.1.6 databases;
> >
> >After completing the on-line backup (Begin/End backup) I do a 'archive
> >stop', but the .arc-file is NOT written to disk, so my on-line backup is
> >useless...
> >To avoid this, I do an 'alter system switch logfile', and then stop the
> >archiver. I move the .arc-files to the backup-location. That's all? No,
> >sometimes the next archive-file has 512 bytes in it, so I move it too.
Now I
> >start the archiver again, and I get an IO-error for Oracle can't find the
> >archive-file. After some errors in the alert.log Oracle creates a new
> >.arc-file with the same number.
> >
> >I don't like this. Shouldn't Oracle write the .arc-file after a 'archive
> >stop'?
> >
> >I know I can solve it by querying the database for the active log number,
> >but it doesn't make things too easy.....
> >

Please see the official ORACLE-L FAQ:
Author: Eric Lansu

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
To REMOVE yourself from this mailing list, send an E-Mail message
to: (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
Received on Fri Oct 27 2000 - 11:31:28 CDT

Original text of this message