Home » RDBMS Server » Backup & Recovery » Archive Log Directory Filling Up the Oracle Volume
Archive Log Directory Filling Up the Oracle Volume [message #225289] Mon, 19 March 2007 09:36 Go to next message
Chewie71
Messages: 19
Registered: October 2005
Location: WIU
Junior Member
Hi all,

I've got almost 50GB of archive logs, some going all the way back to March 2006, and it's filling up my Oracle volume (which is bad). We have an RMAN job that runs nightly, fulls on Friday nights and incrementals on every other night.

Occasionally the area we backup to fills up during a backup and the backup fails (we're working on correcting this too by growing our backup storage area). I'm thinking that when this happens, that the archive logs don't get deleted correctly, and that is why some are still in there going back to last year.

Is there a way to tell which of these logs are "expired" and can safely be deleted? Is there a command that will do this for me in RMAN, or can I just delete them right off the file system?

Thanks,
Matt
Re: Archive Log Directory Filling Up the Oracle Volume [message #225290 is a reply to message #225289] Mon, 19 March 2007 09:41 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
http://www.orafaq.com/forum/m/210421/42800/?srch=delete+archivelog#msg_210418
Re: Archive Log Directory Filling Up the Oracle Volume [message #225294 is a reply to message #225290] Mon, 19 March 2007 10:22 Go to previous messageGo to next message
Chewie71
Messages: 19
Registered: October 2005
Location: WIU
Junior Member
Excellent...thanks...

I just took a backup of my archivelogs, and am now doing a restore validate operation to make sure the backup is ok.

If the validate is ok, then I assume I can manually delete all the archivelogs older than the point in time I started the archivelog backup.

Thanks for the information,
Matt
Re: Archive Log Directory Filling Up the Oracle Volume [message #226453 is a reply to message #225289] Fri, 23 March 2007 16:19 Go to previous message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
cron a job that deletes archivelog file based on creation date.

I forgot the exact command, but it runs every night and clears out archivelog files that are older than 1 month.

`find ./ -name "*.ARC*" -mtime +30 -exec rm {} \;`

or at least compress them
#!/bin/ksh
#@(#)archivemaint -- removes old S2000 archive files & compresses others
###
# Korn script to do Database Archive file maintenance
# for the S2000 database. This should be run about once
# each week or so.
#
# Autor: Neil MacDannald
###
#
# Inform operator what job they have requested
# Ask if they wish to continue
#
echo " "
echo "*****"
echo Starting S2000 Archive file maintenance
echo " "
echo This job should be run about once per week. It removes
echo S2000 database Archive files that are more than 2 weeks old.
echo Archive logs are located in both of the following directories:
echo /u02/oradata/os2p/arch
echo /u24/oradata/os2p/arch
echo " "
echo "Continue? (Y/N)"
read answer
echo " "
if [[ "$answer" = [Yy]* ]]
then
echo " "
echo `date`
echo " "
echo "Count Archive files /u02: " `ls /u02/oradata/os2p/arch/*.ARC* |wc -w`
echo "Count Archive files /u24: " `ls /u24/oradata/os2p/arch/*.ARC* |wc -w`
echo "Last time this job was run: " `cat <archmaint_date`
echo " "
echo "Remove Archive files more than 2 weeks old and compress "
echo " the newer ones? (Y/N)"
echo " "
read answer
if [[ "$answer" = [Yy]* ]]
then
`date >archmaint_date`
startdir=`pwd`
echo "starting dir= " $startdir
cd /u02/oradata/os2p/arch/
echo " temporarily changing to directory " `pwd`
`find ./ -name "*.ARC*" -mtime +14 -exec rm {} \;`
cd /u24/oradata/os2p/arch/
echo " temporarily changing to directory " `pwd`
`find ./ -name "*.ARC*" -mtime +14 -exec rm {} \;`
echo " "
echo "Old files removed, starting compression of new Archive files"
echo " "
echo `date`
echo " "
`compress -v /u02/oradata/os2p/arch/*.ARC`
`compress -v /u24/oradata/os2p/arch/*.ARC`
cd $startdir
echo " changed directory back to " `pwd`
echo " "
echo `date`
echo " "
fi
fi
Previous Topic: Hot backup from standby database
Next Topic: flash back mechanisim in session wise?
Goto Forum:
  


Current Time: Sat Dec 03 14:14:51 CST 2016

Total time taken to generate the page: 0.32608 seconds