Sunday
Nov212010

Deleting old archive logs by date

The other day when logging into one of my test systems I was greeted with the following error:

ORA-00257 archiver error. connect internal only until freed

The cause?  Out of disk space.  Since it was non-production we weren't backing it up, so the archive logs were just hanging out there forever.

I logged into RMAN from the console and launched the following:

allocate channel for delete type disk;
change archivelog until time 'SYSDATE-7' delete;
release channel;

Don't do this on a production system and definitely re-think your decision to have Oracle databases in archivelog mode that aren't being frequently backed up.  I know I will.

 

Cheers