Enter the machine and set the environment variables, such as:
Export oracle_home=/main/app/oracle/product/11.2. 0/db_1export oracle_sid=devdb
Then switch Oracle user, admin mode login Sqlplus
su - oracle[[email protected]~]$ sqlplus/nologsql> Connect/as sysdba
Check the use of Flash recovery area, you can see the archivelog is very large, up to 99.94
SQL>Select* from V$flash_recovery_area_usage;
3, now to clean up the Archivelog archive log, production environment recommended backup
Query Log directory Location
Show parameter recover;
4, Exit Sqlplus, log in with root, delete archive log after backup
Enter a target address first; Create a new Oracle archive log backup directory
mkdir Oracle Archive Log Backups
Enter the archive log source file directory (Devdb is the DB instance name):
cd/mnt/install/ora_11g/app/oracle/flash_recovery_area/devdb/archivelog/
Go outside the Archivelog directory first:
Cd..
Backup Archivelog The following archive log to the previously created Oracle archive log backup directory:
CP-RF archivelog/mnt/oracle Archive Log backup/
After waiting for the backup to complete, delete the archived logs that have been backed up
5, after deleting the archive log, the control file must be maintained with Rman, otherwise the space display still does not release
Use the Oracle User Login server to enter Rman maintenance:
Check out some useless archivelog.
Rman> crosscheck Archivelog All;
Delete all Archivelog up to the first 5 days
until Time ' sysdate-5 ' ;
6, re-query the use of Flash recovery area:
First follow step 1, enter the Sqlplus environment, and then use the following command to query the discovery, only use 0.66%, the clear archive log success!
Select * from V$flash_recovery_area_usage;
Oracle Log Archive Space cleanup