Home » RDBMS Server » Server Administration » Archive Log Problem
Archive Log Problem [message #56205] Wed, 12 March 2003 11:22 Go to next message
Oraclehelp
Messages: 2
Registered: March 2003
Junior Member
I have a win2k server. The oracle 8 is has been running on Archive log mode. Now I dont have any space on the disk. I somehow created some space on the disk but this will soon burn out. Is there anyway I can set automatically to free the logs? Can anyone tell me the steps for it.

Thanks
Re: Archive Log Problem [message #56226 is a reply to message #56205] Thu, 13 March 2003 05:31 Go to previous messageGo to next message
Uwe
Messages: 260
Registered: February 2003
Location: Zürich, Switzerland
Senior Member
Hi,
I guess you should save the archived logs to Tape if you need to hold on online-backup and restoring in time. The Archive-Logs neednot to be stored on HD, only for restoring.
rgds
Re: Archive Log Problem [message #56232 is a reply to message #56205] Thu, 13 March 2003 05:50 Go to previous messageGo to next message
psmyth
Messages: 81
Registered: October 2002
Member
I am not aware of any 'Oracle' supplied utilities to housekeep your archivelogs, but I don't run on win2k, so check with Oracle. On unix, I have a shell script which switches the logs every thirty minutes, compresses old logs and removes any logs older than 7 days. The logs will usually compress to about 25% of their original size. You should be able to implement something similar in a windows script... or search the oracle 'tech tips' sites for one that someone has written already ;-)
Re: Archive Log Problem [message #56239 is a reply to message #56232] Thu, 13 March 2003 07:45 Go to previous messageGo to next message
Oraclehelp
Messages: 2
Registered: March 2003
Junior Member
Will oracle create any problem If I delete the files that are 7 days old. Please let me know this because I dont have a tape drive.
Re: Archive Log Problem [message #56245 is a reply to message #56239] Thu, 13 March 2003 09:12 Go to previous messageGo to next message
psmyth
Messages: 81
Registered: October 2002
Member
yon need to keep archive logs for as long as you might need to recover.

If you have no tape drive, it sounds like you are not actually taking backups of your database off the server. So if your server dies or you have a disk failure, it would appear that you have no way of recovering your database. In this case it is arguable whether you really need to be running in archive log mode.

Obviously if you have a database issue and no server problems, and you need to recover, having hotbackups and archive logs allow you to recover to a point in time prior to the database issue.

You haven't stated if you are taking hot backups of the database - again, if you aren't, then there really is no point having the database in archivelog mode. The creation of the archive logs will impact the database performance, and without hotbackups, you have no use for archive logs.

I would suggest that you should be running in archive log mode and taking a hot backup of the database every day. If you keep the archive logs for seven days and the hotbackup files for seven days then you can recover to any point in time over those seven days.

Many databases hold highly dynamic data (ie it gets changed a lot) and the concept of recovering the database to a version seven days old would be unacceptable to the business. In this case, there is little point keeping hotbackups and archive logs for that long. Deleting old archive logs has no effect on the database, but will impact your ability to recover to the point in time when they were created.

If you do not have access to a tape backup system, then it would be worthwhile to take hot backups of the database daily, and upon creation of the backup files, copy them to a separate server - copy the archive logs as well (and maybe write a script to run every half hour to copy any new ones to the other server).

Make sure that the 'security' on the other server is at least as good as the database server - anyone getting access to the backup files and archive log files on the other server could recreate your database for themselves.

I hope that helps... let me know if this isn;t clear or you have any more questions!

One other thing... it is recommended to take regular exports of the database in additon to hotbackups. They give you additional flexibility in terms of recovery, and that is always a good thing.

Rgds
paul
Re: Archive Log Problem [message #56247 is a reply to message #56205] Thu, 13 March 2003 11:46 Go to previous message
Trifon Anguelov
Messages: 514
Registered: June 2002
Senior Member
Make sure you backup the archived logs before delete them. You will need them until the next successful hot backup is completed. By simple deleting them you are making the recovery of your db impossible.

If you have RMAN setup to do your backups then you can use This script to backup and delete the archived logs from time to time. All you need is "du" UNIX utility (available on Internet) and simple batch or perl script to check the disk space of the archived logs directory and starting the RMAN script. Then schedule this script to run every N minutes.

Hope that helps,

clio_usa
OCP - DBA

Visit our Web site

Previous Topic: oracle 9i 32bit and 64bits
Next Topic: How To make Queries In Sql
Goto Forum:
  


Current Time: Fri Sep 20 00:25:23 CDT 2024