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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Managing Archive Log Files

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
US
Hi All,

As an Oracle 8/9 newbie I am baffled as to how to manage all those many Archived log files on a Sun Solaris system.

1. Is there one technique that works in Oracle 8.17 and 9i to proactively ensure the Archived Log Files do not fill up a disk?

2. Would it be OK to say delete the oldest 25% of them while the database is up?

Thanks for your advice,

Michael42
 
Michael,

I presume you are taking either hot or cold backups regularly. When you spool off the backups, also spool off the archive logs to tape. Frankly, you don't need to leave any archive logs on disk once they're created. Spool them off, catalog them, and re-cycle the tapes once they are older than two generations of backups.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 21:12 (05Jul04) UTC (aka "GMT" and "Zulu"), 14:12 (05Jul04) Mountain Time)
 
Michael,
1. have a look at the tool RMAN (part of server-installation). You can backup and delete old archive logs in one step using it.
2. For your current situation: only delete archives, which are older than your most recent backup. You need an intact archive-chain to recover in case of a disaster.

Stefan
 
And to save space whilst the logs reside on the disk, you can run a regular job (through cron say) to compress/gzip the files so that they don't take up anywhere near as much room. Of course they need to be unzipped in the unhappy event that you should need them!
 
Great suggestions all.

Thanks for helping to demistify Archive Logs. :)

Thanks,

Michael42
 
Hi !

I am a person in a similar position as Michael, newbie to Oracle DBA tasks!
We are filling up about 1 GB in Logs every day and I am compressing them manually and copying them to another location. But I think it is practically useless as I can't find a copy of the Full Backup.

How can I set up a full back up for Sunday night, have the logs deleted when the full backup is taken.

I would appreciate all suggestions!
(P.S. I am still in the process of figuring out RMAN, at this point, I have just connected to it!)

SP
 
Can you clarify what OS you're running, please. If it's a *nix, you should be able to set up a cron job to shutdown and backup your database on Sunday. Alternatively, you could try a hot backup whilst the system is up - I've never done that (but plan to soon). Others will be able to advise on this and RMAN, but try a keyword search in this forum too.

As for deleting your logs immediately after the backup - be careful to verify a) that your backup completed successfully and b) that it's readable. There's nothing worse than deleting your logs, then having to restore only to find that your backup isn't viable.

Just a few initial thoughts.
 
pshetal

If you're generating 1GB of logs every day, then I suggest you do a hot backup every day. You can use RMAN for this but if you only have one database, then some people consider it to be a sledgehammer to crack a nut. Shell scripts are perfectly adequate for the task. RMAN comes into its own when you have lots of disparate databases and enough hardware to ensure that the recovery catalogue can be kept on its own and secure.

I suggest you read (several times), if you have not already done so the Backup and Recovery Concepts manual.

Then decide whether to use RMAN or scripts.

There is no reason to take the database down for backups. Hot backups work perfectly well and in your case would be a good idea (in my opinion!)

The reason I suggest daily backups is that in the event of a failure you would potentially have to reapply up to 7GB of archive logs to get you database up to date. this may be a severe pain depending on the hardware you have.

Alex
 
FYI Ken

>>Can you clarify what OS you're running, please. If it's a *nix,

Yes Sun Solaris 8.


Thanks again for your comments,

Michael42
 
Thank you Ken and Alex for you valueable suggestions.
I will definitely look into hot Backups and how to schedule them.

I am running SunOS 5.7 on the Oracle server. I am not very comfortable at the idea of having a job shutdonw and startup the database, just because we have issies 40% of the times we attempt DB shutdown and startup.

I wil definitely read the Backup and Recovery Manual and see how to set up a hot backup (may be every other day if not everyday), keeping the logs for the 2 weeks or 10 days seems aceptable at this point as we are running out of disk space (37 GB in all), adding more disks is not an option, we will have to replace the server.

Thank you again!
Shetal
 
One further note - it may be prudent to lean towards RMAN if you see yourself upgrading to 10i in the near future. This is because one of the features within 10i (ASM-based data files - whatever they are :) ) can only be backed up with RMAN.

Clearly Oracle think RMAN is the future (or even the present)

Alex
 
Thanks. You really need to investigate the issues you're having when shutting down/starting your database - it may be symptomatic of a more serious malaise. Post here (or open another thread) if you need advice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top