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: backing up archive logs on Win2K

Re: backing up archive logs on Win2K

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Wed, 9 Jan 2002 06:01:28 +1100
Message-ID: <3c3b41b9$0$24237$afc38c87@news.optusnet.com.au>


This is probably why I've never taken the DBA Handbook too seriously!

Stopping the archiver on a production database is a daft thing to do, because it puts you at risk of a rather nasty database hang. It's not too serious, because once you re-start the archiver, everything will (eventually) spring back into life and catch up with itself. But it seems a dubious practice at best, particularly on a production database.

The reason (I presume) that they suggest doing this is because there is otherwise a risk that you would start to host copy an archive file which is actually in the process of being created (i.e., being written to by ARCH). That would obviously not be good news. But there are much better ways of avoiding that in any case. For example, issue the 'archive log list' command from within Server Manager or SQL Plus, and it will tell you what the current redo log sequence number is (say it is 1056). That means I would not want to backup by 'arch_1055.rdo' archive file, because that is the last one produced, and it *might* still be 'hot'. That's assuming your archive system is keeping up with LGWR, of course -there's no guarantee that multiple archives wouldn't be being written to simultaneously if you have several online logs which are 'active' at the same time. So for safety's sake, you might lop several numbers off the current sequence. So long as your next backup starts from where you left off, all the archives will eventually get backed up.

On the other hand, there's no need to go to all this fiddly stuff in the first place. If you query v$archived_log, you'll get a list of the archives produced -and that view is (so far as I can tell -but you might want to test for yourself) only aware of logs which have been successfully written and closed off (i.e., cold logs). Again, for safety's sake, you can order the output of that view by 'sequence#' and lop a few numbers off.

Regards
HJR "gdas" <gdas1_at_yahoo.com> wrote in message news:7a4ed455.0201072158.700e79e9_at_posting.google.com...
> Hi,
>
> I'm running 8.1.6 on Windows 2000 Server. Thus far we have been doing
> cold backups of the database and I am designing a process that will
> automatically do a hot backup every night, copy the datafiles and
> archived logs to a separate server where they will then be zipped and
> picked up by a nightly tape backup process. I'm just practicing now
> on a scratch server, however,this is the first time I have ever tried
> a hot backup.
>
> For diskspace reasons, I'm trying to miminize the number of archived
> redo logs I keep on the server.
>
> I'm reading the Oracle DBA Handbook and it says that after I've done
> the hot backup of the datafiles, I should:
>
> 1. stop the archiver process in oracle
> 2. record the names of the archived log files from my archive log dest
> dir.
> 3. resume the archiver process in oracle
> 4. copy/backup the files from step 2.
> 5. delete the files from step 2.
>
> If I were using a normal programming language like C++, java or PL/SQL
> this would be very straight forward and easy, however, I'm trying to
> do this in a DOS Batch file and I simply don't know how to store a
> list of file names somewhere and then subsequently loop on them (for
> the step 4 and 5).
>
> I thought that perhaps instead of simply getting the list of files in
> step 2, I would just go to step 4 and copy the files and then after
> that resume the archiver process. I assume that you don't want that
> process stopped for too long which is why the book stated to get the
> file list and then quickly resume the archiver process. Can someone
> confirm? What are the consequences of having a live system running
> with the archiver process down for too long? Will the database pause?
> or will the instance crash?
>
> Is there a way to get a list of the files in the archive log dir from
> an oracle table? Are the file names stored in there somewhere? I
> would then be able to do this with a combination of pl/sql and host
> commands.
>
> Appreciate any help
>
> Thanks,
> Gavin
Received on Tue Jan 08 2002 - 13:01:28 CST

Original text of this message

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