Ano-Tech Computers
Enter keyword:

Oracle: Deleting old archive logs
Problem:
When using archive logs, Oracle will keep filling up the disk. One day (usually a friday evening or during a holiday) the disk is full and all the databases go down in flames. How can I prevent this from happening?
 
Solution:
Using the management console, check where the archive logs are kept. Note: Do NOT EVER delete the redo log files, those are needed by the system. If you are unsure, google "oracle archive logs" and read up on the subject.

When sure, locate the archive log files older than N days by saying for instance
"find . -mtime +30 | grep archive/ | xargs ls"

Check the files again, and if you are 100% sure, substitute ls with rm and run the search again.

Now you have to tell RMAN that those archive logs are gone:
"/oracle/app/oracle/product/9.2.0/bin/rman target sys"
password: (xxxxxxxx)
"crosscheck archivelog all;"
"delete expired archivelog all;"


 
Discuss this solution
Did this article solve your problem? Yes No Did not apply

We welcome anyone who is willing to contribute to this public knowledge base, contact siteadmin@atc.no if you have information you would like to share. The idea is not to replace the commercial support sites, but to publish those hard-to-find solutions you've found yourself looking for over and over again.

Show all articles