When the archive log space in Oracle is full, it needs to be emptied, otherwise it will affect the database's normal operation.
You will not be able to log in to Oracle properly, and you need to delete some archived logs to log into Oracle properly.
First, delete the archive log physical files, archive logs are generally located in the archive directory, in Oracle 10g in the AIX system file format is "1_17884_XXX.DBF", it is recommended that the database before the operation of the backup, Delete at least the last few days of log for database recovery.
Second, after the physical file of the archived log is deleted, we can log into Oracle normally, but the archive log is not completely deleted, and Oracle's controlfile still records these archivelog information. In Oracle's OEM manager there is a visual log showing that when we manually clear the files in the archive directory, these records are not erased from the controlfile, and then we have to do this job.
1. Specifying a DB instance
Log in to Database
2. Connect to the database
>rman TARGET/ --Log in only Nocatalog mode because no catalog is used
3. View the status of archived logs
rman> list Archivelog all; --Show all archived log information
4. Manually delete archived log files
Rman> DELETE ARCHIVELOG all completed before ' SYSDATE-7 ';
Description
SYSDATA-7, indicates that the current system time 7 days ago, the Before keyword represents the archive log 7 days ago, and if the flashback function is used, the flashback data is also deleted.
In the same way, you can delete all logs from 7 days ago to the present, but this command should be considered clearly, after this deletion, it is best to make full backup database immediately
DELETE ARCHIVELOG from time ' SYSDATE-7 '; Delete all logs from 7 days ago to the present, with caution
Unix/linux can also find the archived data 7 days ago using the EXEC sub-operation to delete
Find/oraarchive-xdev-mtime +7-name "*.dbf"-exec rm-f {};
Doing so will still leave an undocumented archive in Rman
You still need to execute the following 2 commands in Rman
Crosscheck Archivelog All;
Delete Expired Archivelog all;
5. Make a manual full-library backup again
Backup Database
Backup control files, parameter files, archive logs at the same time
6. Reporting an outdated backup using the report obsolete command
7, then use the delete obsolete command to delete the outdated backup, if not deleted, you can add a parameter force to delete
This article is from the "My main beam margin" blog, please be sure to keep this source http://xiaocao13140.blog.51cto.com/6198256/1970940
How to correctly delete an Oracle archive log file