|
|
|
|
| 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;"
|
|
|
|
|
|
This is free technical advice without any warranties.
Use at your own risk. Solutions offered may not apply to your particular problem at all.
Opinions and views expressed in the articles are the authors' personal
and may not necessarily reflect or coincide with those of Ano-Tech Computers.
We take no responsibility if anything bad happens from following any of
the intructions given. If you don't understand and accept this, please
contact us for personal assistance instead.
To read our full disclaimer, go
here.
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