oracle delete archive logs manually


This article comes from the Linux Commune website (www.linuxidc.com). 6 Try to synchronize , see if it works , the result does not work , crosscheck still fails : Starting resync of all recovery directories. We use RMAN to delete operation, the operation steps are as follows: (WIN client system as an example), C:\Documents and Settings\Administrator>SET Oracle_SID =orcl, C:\Documents and Settings\Administrator>RMAN TARGET SYS/sysadmin@orcl. The archivelog information is still recorded in Oracle's controlfile, which is visualized in Oracle's OEM manager The log shows that when we manually clear the files in the archive directory, these records are not cleared from the controlfile by us. Many people delete things directly. The before keyword indicates the archived logs 7 days ago. 5 Check the archive log with crosscheck in rman , and both archive logs failed : Archive log file name =D:ORACLEORADATATESTARCHIVE1_47.DBF record ID=1 timestamp =572866, Archive log file name =D:ORACLEORADATATESTARCHIVE11_48.DBF record ID=2 Timestamp =57286. So it is not as easy to use as the above method, but the advantage of using FIND is that you can do a lot of operations on conditions and EXEC sub-items to achieve more complex functions. DELETE ARCHIVELOG ALL COMPLETED BEFORE'SYSDATE-7'; SYSDATA-7 indicates that the current system time is 7 days ago. connected to target database: TEST (DBID=1870953724), archive log filename=D:ORACLEORADATATESTARCHIVE1_47.DBF recid=1 stamp=57286, archive log filename=D:ORACLEORADATATESTARCHIVE11_48.DBF recid=2 stamp=5728, Source: Linux community Author: crasshopper. If the flashback function is used, the flashback data will also be deleted. Use the delete obsolete command to delete expired backups : Deleting the following obsolete backups and copies: Do you really want to delete the above objects (enter YES or NO)? So you need to manually execute the crosscheck process at this time , and then the Rman backup can be restored to normal. 4. It can delete archives and files correctly. ORACLE has it, and it is very smart. 8 Try to change the language environment , and the result is crosscheck again , and both archive logs are successful : C:>set nls_lang=american_america.zhs16gbk, Recovery Manager: Release 9.2.0.1.0-Production. If the flashback function is used, the flashback data will also be deleted. controlfile still recorded these archivelog information in oracle 's OEM has a visual log to show manager, when we manually clear the archive after the files in the directory, these records have not been us from controlfile removed, that is oracle I dont know that these files no longer exist ! Many people delete things directly. Archive logs are generally located in the archive directory. yes, backup piece handle=/data1/oracle/orabak/full_AVATAR2_20041206_173 recid=173 stamp=544156241, archive log filename=/opt/oracle/oradata/avatar2/archive/1_2715.dbf recid=2703 stamp=545108268, archive log filename=/opt/oracle/oradata/avatar2/archive/1_2714.dbf recid=2702 stamp=545107659, specification does not match any archive log in the recovery catalog. All rights reserved. After this deletion, it is best to perform a full backup of the database immediately, So it is not as easy to use as the above method, but, sub-items to achieve more complex functions. You need to delete some archive logs to log in to Oracle normally. It is wrong. Log in to the database server host as an ORACLE user or connect via the network. does not have an archive maintenance tool. days ago. Link to the original text: http://www.linuxidc.com/Linux/2010-08/27746.htm, Reference : https://blog.csdn.net/lansesl2008/article/details/17554513, has a visual log to show manager, when we manually clear the, after the files in the directory, these records have not been us from, I dont know that these files no longer exist. If the flashback function is used, the flashback data will also be deleted. An ORACLE archive log is often full, which means that the file space of /oraarchive occupies 100 %. After this deletion, it is best to perform a full backup of the database immediately, Under UNIX/LINUX , you can also find archived data 7 days ago through FIND , and delete it using the EXEC sub-operation. ORACLE correct way to delete archives and reclaim space. 2. If you have never done this action before, we can compare the size of the controlfile before the action and the controlfile after the action ! In the same way, you can also delete all logs from 7 days ago to the present, but this command should be carefully considered. Do not delete the archive log as a last resort. data recovery and backup. 4. delete expired archivelog all; command to delete all expired archive logs : At this time, when we go to the OEM, we will not see it. First delete the physical archive log files. 1. When the archive log is manually deleted, Rman Backup will detect that the log is missing and cannot continue execution. indicates that the current system time is.

Briefly introduce the report obsolete command, Use the report obsolete command to report expired backups, RMAN retention policy will be applied to the command, RMAN retention policy is set to redundancy 1, -------------------- ------ ------------------ ------ --------------, Backup Piece 125 01-NOV-04/data1/oracle/orabak/full_1_541045804, Backup Piece 131 04-NOV-04/data1/oracle/orabak/full_AVATAR2_20041104_131, Backup Piece 173 06-DEC-04/data1/oracle/orabak/full_AVATAR2_20041206_173, Backup Piece 179 11-DEC-04/data1/oracle/orabak/arch544588206.arc, Backup Piece 189 17-DEC-04/data1/oracle/orabak/arch545106606.arc, Backup Piece 190 17-DEC-04/data1/oracle/orabak/arch545106665.arc, Backup Piece 191 20-DEC-04/data1/oracle/orabak/arch_AVATAR2_20041220_194, Archive Log 2973 20-DEC-04/opt/oracle/oradata/avatar2/archive/1_2985.dbf, Archive Log 2971 20-DEC-04/opt/oracle/oradata/avatar2/archive/1_2984.dbf, Archive Log 2705 17-DEC-04/opt/oracle/oradata/avatar2/archive/1_2717.dbf, Archive Log 2704 17-DEC-04/opt/oracle/oradata/avatar2/archive/1_2716.dbf, Archive Log 2703 17-DEC-04/opt/oracle/oradata/avatar2/archive/1_2715.dbf, Archive Log 2702 17-DEC-04/opt/oracle/oradata/avatar2/archive/1_2714.dbf. If you have never done this action before, we can compare, correct way to delete archives and reclaim space. FLASHBACK , but remember that the ORACLE archive log is very important for ORACLE data recovery and backup. RMAN> DELETE ARCHIVELOG ALL COMPLETED BEFORE'SYSDATE-7'; SYSDATA-7 indicates that the current system time is 7 days ago. days ago to the present, but this command should be carefully considered. Of course, after these physical files are deleted under the OS , in our. The next thing we need to do is this work.

this time, if we want to manually clean up, I will try this method after experimenting: command to delete all expired archive logs, will not see it. We all know that the relevant information of each archivelog is recorded in the controlfile . Do not delete the archive log as a last resort. The file format under AIX system is "1_17884_667758186.dbf". crosscheck archivelog all; The verification is the archive log of the DB , that is , the file at the location specified by the log_archive_dest parameter. Copyright (c) 1995, 2002, Oracle Corporation. It can delete archives and.

At this time, if we want to manually clean up, I will try this method after experimenting: [The order of execution is as follows: manually delete archivelog --->crosscheck--->delete expired and finally check with list copy]. The before keyword indicates the archive log 7 days ago. has it, and it is very smart. For database recovery. When the Oracle archive log is full, you will not be able to log in to Oracle normally. After deleting the physical file of the archive log, we can log in to Oracle normally, but the archive log has not been completely deleted. DELETE ARCHIVELOG from TIME'SYSDATE-7'; Delete all logs from 7 days ago to the present, use with caution, Under UNIX/LINUX, you can also find archived data 7 days ago through FIND, and delete it using the EXEC sub-operation. It is wrong. 7 Use list expired to see if there is an invalid archive log to prove that there is no invalid archive log: The description does not match any archive logs in the recovery catalog. find/oraarchive -xdev -mtime +7 -name "*.dbf" -exec rm -f {}; Doing so will still leave unmanaged archive files in RMAN, Still need to execute the following 2 commands in RMAN, So it is not as easy to use as the above method, but the advantage of using FIND is that you can do a lot of operations on conditions and EXEC sub-items to achieve more complex functions, 3. Everyone must complain about why ORACLE does not have an archive maintenance tool. It is recommended to back up the database before operation, and keep at least the last few days of logs when deleting.