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: Archive logs in control file

Re: Archive logs in control file

From: Joel Garry <joel-garry_at_home.com>
Date: 28 May 2004 09:55:35 -0700
Message-ID: <91884734.0405280855.6e2e1fc3@posting.google.com>


sybrandb_at_yahoo.com wrote in message news:<a1d154f4.0405270002.7ee9ef7a_at_posting.google.com>...
> joel-garry_at_home.com (Joel Garry) wrote in message news:<91884734.0405261517.3b5a406e_at_posting.google.com>...
> > "G Dahler" <yellow-shark_at_spamex.com> wrote in message news:<1b2tc.29113$sr3.805608_at_news20.bellglobal.com>...
> > > "Chloe Crowder" <chloe.crowder_at_bl.uk> a écrit dans le message de
> > > news:f27559a3.0405260610.2700066_at_posting.google.com...
> > > > Hi
> > > >
> > > > in Oracle 817 is there a mechanism for clearing the list of archive
> > > > log files held in the control file. We interrupted the log archive
> > > > mechanism on a production server and restarted later, but this means
> > > > there are several thousand useless log files listed. Also in a test
> > > > server where were trying out backup/recovery scenarios we've got
> > > > duplicate files listed - presumably from where we've reset logs after
> > > > partial recovery.
> >
> > If you are using RMAN, you might want to do something like
> > connect target
> > allocate channel for maintenance type disk;
> > sql "alter system archive log current";
> > change archivelog all crosscheck;
> > crosscheck backup;
> > delete expired backup;
> > release channel;
> >
> > If you are not using a catalog, see
> > http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76990/recocat.htm#435991
> >
> > If you are using a catalog, you might explain your question better.
> >
> > If you are looking in v$archived_log, say so.
> >
> > > >
> > >
> > > IIRC, the liste or archived log files is not in the controlfile and
> > > automatically "purges" itself after 30 days or so...
> > >
> > > But I may be wrong
> >
> > See RMAN nocatalog.
> >
> > jg
>
>
> I think you are mistaken. The change .. crosscheck command deals with
> files that have been backed up. Even if you use RMAN and delete your
> archivelogs from disk, they will NOT be removed from the controlfile.
> The OP really shouldn't bother (looking at her other problems)
>
> Sybrand Bakker
> Senior Oracle DBA

Well, it wouldn't be the first time.

Anyhow, executing the above command file does, among other things, check to see if the archived log is on disk, and if it isn't, gives a RMAN-06157: validation failed for archived log. Since I only get that once after I've deleted the log (with a find cron that lags a few days) and I run the command every night, I assumed that it was being removed from the controlfile. If it isn't removing it from the controlfile, what is, or is it just marking it in the controlfile?

In RMAN, I do a list copy of database archivelog all; and it appears to just know about the ones on disk.

You are right, v$archived_log is a view of logs known in the controlfile. http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76961/ch37.htm#6831

So there is some marking of the controlfile entries by RMAN, one can't assume that just 'cause RMAN doesn't list it, it isn't there.

And of course CONTROL_FILE_RECORD_KEEP_TIME is what the OP needs to deal with. http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76961/ch121.htm#37305 http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76990/recocat.htm#436704 (I wrote this before I saw you answered it to the OP already, I'm sure you realize all this stuff that you obviously know is for the benefit of lurkers and the OP and me, when I forget it again).

jg

--
@home.com is bogus.
Should this guy be rich? 
http://www.signonsandiego.com/news/features/20040525-9999-1c25sexcom.html
Received on Fri May 28 2004 - 11:55:35 CDT

Original text of this message

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