Unix Technical Forum

Archive logs in control file

This is a discussion on Archive logs in control file within the Oracle Database forums, part of the Database Server Software category; --> Hi in Oracle 817 is there a mechanism for clearing the list of archive log files held in the ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-23-2008, 09:38 AM
Chloe Crowder
 
Posts: n/a
Default Archive logs in control file

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.

Thanks
Chloe Crowder
The British Library
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-23-2008, 09:38 AM
G Dahler
 
Posts: n/a
Default Re: Archive logs in control file


"Chloe Crowder" <chloe.crowder@bl.uk> a écrit dans le message de
news:f27559a3.0405260610.2700066@posting.google.co m...
> 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.
>


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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-23-2008, 09:39 AM
Sybrand Bakker
 
Posts: n/a
Default Re: Archive logs in control file

On Wed, 26 May 2004 10:52:41 -0400, "G Dahler"
<yellow-shark@spamex.com> wrote:

>
>"Chloe Crowder" <chloe.crowder@bl.uk> a écrit dans le message de
>news:f27559a3.0405260610.2700066@posting.google.c om...
>> 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.
>>

>
>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
>



This list of archived log files definitely IS in the control file, and
it is kept controlfilerecord_keeptime days (which might be 30, though
the default is 7)


--
Sybrand Bakker, Senior Oracle DBA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-23-2008, 09:39 AM
Sybrand Bakker
 
Posts: n/a
Default Re: Archive logs in control file

On 26 May 2004 07:10:39 -0700, chloe.crowder@bl.uk (Chloe Crowder)
wrote:

>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.
>
>Thanks
>Chloe Crowder
>The British Library



Don't bother. They will disappear in a few days time. And as you can
query v$archived_log it shouldn't be a concern.
The other question is just too vague to answer, the suggestion you
provide however is definitely rubbish.


--
Sybrand Bakker, Senior Oracle DBA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-23-2008, 09:39 AM
Joel Garry
 
Posts: n/a
Default Re: Archive logs in control file

"G Dahler" <yellow-shark@spamex.com> wrote in message news:<1b2tc.29113$sr3.805608@news20.bellglobal.com >...
> "Chloe Crowder" <chloe.crowder@bl.uk> a écrit dans le message de
> news:f27559a3.0405260610.2700066@posting.google.co m...
> > 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...cat.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
--
@home.com is bogus.
http://catless.ncl.ac.uk/Risks/23.36.html#subj1
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-23-2008, 09:39 AM
sybrandb@yahoo.com
 
Posts: n/a
Default Re: Archive logs in control file

joel-garry@home.com (Joel Garry) wrote in message news:<91884734.0405261517.3b5a406e@posting.google. com>...
> "G Dahler" <yellow-shark@spamex.com> wrote in message news:<1b2tc.29113$sr3.805608@news20.bellglobal.com >...
> > "Chloe Crowder" <chloe.crowder@bl.uk> a écrit dans le message de
> > news:f27559a3.0405260610.2700066@posting.google.co m...
> > > 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...cat.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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-23-2008, 09:43 AM
Joel Garry
 
Posts: n/a
Default Re: Archive logs in control file

sybrandb@yahoo.com wrote in message news:<a1d154f4.0405270002.7ee9ef7a@posting.google. com>...
> joel-garry@home.com (Joel Garry) wrote in message news:<91884734.0405261517.3b5a406e@posting.google. com>...
> > "G Dahler" <yellow-shark@spamex.com> wrote in message news:<1b2tc.29113$sr3.805608@news20.bellglobal.com >...
> > > "Chloe Crowder" <chloe.crowder@bl.uk> a écrit dans le message de
> > > news:f27559a3.0405260610.2700066@posting.google.co m...
> > > > 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...cat.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.../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...h121.htm#37305
http://download-west.oracle.com/docs...cat.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/f...c25sexcom.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:51 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com