Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need an easy straight forward explanation on deleting archive logs 2

Status
Not open for further replies.

tuliphead

IS-IT--Management
Aug 27, 2004
143
NO
Hi!

Oracle is not my strongest side, but right now ... it is in the middle of the summer holiday, and all the "experts" are gone for vacation.

I have an Oracle 9i Dataguard where the disk is almost full (I guess I have 5-6 days of free diskspace left). After a quick investigation and after deleting old backup jobs ... I concluded that the archive logs is the big sinner. I see there is three years of archive logs saved on the system ... and that should hardly be necessary when we are performing a full backup each day.

So my question is:
Can someone explain to me an easy, straightforward procedure to remove all uneccessary archive logs from the system?

I guess keeping the lasth month or week should be sufficient, but after what I´ve read so far it is not enought just simply deleting the files on the filesystem level. I need to remove any oracle references to the same archive log files as well, right?

I´ve seen a couple of examples based on RMAN and some based on SQLplus ... but since this is not the time for investigation, I simply need something that can do the basic for me right away.

Could someone please help? :-\

 
Follow up question:
I ran the "report obsolete" command from RMAN.
It listed the archive logs in the interval 30th of june - 17th of july. Does this mean that I safely can delete all archive logs before 17th of july?

Do I need to run any additional commands to remove any system references to those archive logs? Or is it simply enough to delete the actual files (filesystem)?
 
Hi,

you may delete unneeded archivelog files just at OS level, you don't have to tell Oracle. And three years of archive log files just looks like a giant waste of disk capacity.

But on the other hand, you just say you are performing a full backup each day.
What does this mean? If you are speaking about a consistent database backup, wether offline or online, all is fine. But if this just means a file system backup, while your database is running, this is not fine at all.
And I wonder if you maybe have one consistent database backup which is three years old. Then you would need all those archive log files in case you need to restore. That would be an absurd backup concept of course, but from what you wrote I cannot exclude this possibility, and I just want to be sure. [wink]

And by the way, if you use RMAN to backup, you may include 'delete input' in your script. RMAN will then delete all archive log files after backing them up.

And one other question, what is not clear from you text:
Those three years of archive log files, are they in your archivelog directory, where they are created by Oracle? Or do you perform a backup to disk, and they are in a backup directory?
In the first case, you may delete them (or let RMAN delete them) as soon as they have been saved (to disk or to tape or to whatever).
In the latter case, it is up to you how long you want to keep them, and it depends on how long you keep your database backups.

hope this helps
 
The RMAN backup looks like this:

allocate channel d1 type disk;
backup database
format 'Q:\custwarn\rmanbackup_%U.bak' plus archivelog;

That should be sufficient? And this does not mean that I am dependent on three years of archive logs in a recovery situation?

How does that fit into your description? I probably should put the 'delete input' into it somewhere ... and I guess the backup job itself is defined as "online", and that it is consistent. No instance of any kind is stopped while backing up the database. My three years of log files are in the archivelogdir where Oracle creates them.

I don´t know if any retention plan is defined in RMAN, but my guess is that it isn´t.

Anyway, some kind of automatic deletion of archive logs should be defined at least.

 
Hi,
your RMAN backup looks good, and I understand it is this what is running each day. You won't need 3 years of archive log files, you may delete the old ones.
I don't know the exact syntax of RMAN by heart, so I cannot tell you where to put that 'delete input'. You may either look in the manuals or wait for some of your experts to return from vacation.
And by the way, if you don't need disk space that urgently, why not keep at least the last month, till the experts will come back?
regards
 
hoinz:
It is exactly what I have done. Got to take a closer look at this later on. For now I have just cleaned the disk system so it is enough space for the weeks to come.

Thanx for the input :)
 
we are on 10g and use this command. It deletes the archive logs once backed up. Might be the same for 9 ??

backup database plus archivelog delete input;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top