Solution to Rman backup failure caused by loss of archive logs

Source: Internet
Author: User
The archivelog file in the Test Library is accidentally deleted, but the file in the control file is still marked as valid (see selectname, sequence #, resetlogs_id, archived, delet

The archivelog file in the Test Library is accidentally deleted, but the file in the control file is still marked as valid (see select name, sequence #, resetlogs_id, archived, delet

-- The archive log file of the test database has been accidentally deleted. The solution is as follows:

RMAN> backup as compressed backupset database plus archivelog delete input;

Start backup from 24-2-12
The current log is archived.
Use channel ORA_DISK_1
Use channel ORA_DISK_2
MAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: backup plus archivelog command (on 01:02:19) failed
RMAN-06059: failed to find the expected archive log, loss of archive log will affect recoverability
ORA-19625: Identify file E: \ Oracle \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ ARCHIVELOG \ arc00148_068451_46.001 Error
ORA-27041: Unable to open file
OSD-04002: Unable to open file
O/S-Error: (OS 2) the system cannot find the specified file.

RMAN> crosscheck archivelog all;

Released channel: ORA_DISK_1
Released channel: ORA_DISK_2
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 138 devtype = DISK
Allocated channel: ORA_DISK_2
Channel ORA_DISK_2: sid = 137 devtype = DISK
An error occurred while verifying the archived logs.
Archive log file name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ ARCHIVELOG \ arc00149_068451_46.001 Record ID = 94 timestamp = 776048489
An error occurred while verifying the archived logs.
Archive log file name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ ARCHIVELOG \ arc00150_068451_46.001 Record ID = 95 timestamp = 776048537
2 objects that have been cross-checked


The archived log is verified successfully.
Archive log file name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ ARCHIVELOG \ arc00148_068451_46.001 Record ID = 93 timestamp = 776048448
1 object that has been cross-checked


You can use RMAN> delete expired archivelog all; or the following command
RMAN> delete archivelog like 'e: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH % ARC00148 % _ 0684537946.001 ';


Released channel: ORA_DISK_1
Released channel: ORA_DISK_2
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 138 devtype = DISK
Allocated channel: ORA_DISK_2
Channel ORA_DISK_2: sid = 137 devtype = DISK


List of archived log copies
Keyword Thrd Seq S short time name
---------------------------------
1658 1 148X24-2 month-12 E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ ARCHIVELOG \ arc00148_068451_46.001


Are you sure you want to delete the above objects (enter YES or NO )? Yes
Deleted archived logs
Archive log file name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ ARCHIVELOG \ arc00148_068451_46.001 Record ID = 93 timestamp = 776048448
1. The object has been deleted.


RMAN> backup as compressed backupset database plus archivelog delete input;


Start backup from 24-2-12
The current log is archived.
Use channel ORA_DISK_1
Use channel ORA_DISK_2
Channel ORA_DISK_1: Start the compressed archiving log backup set
Channel ORA_DISK_1: archiving logs in the specified backup set
Input archiving log thread = 1 sequence = 149 Record ID = 94 timestamp = 776048489
Input archiving log thread = 1 sequence = 150 Record ID = 95 timestamp = 776048537
Channel ORA_DISK_1: Starting segment 1 from 24-2-12
Channel ORA_DISK_2: Start the compressed archiving log backup set
Channel ORA_DISK_2: archiving logs in the specified backup set
Input archiving log thread = 1 sequence = 151 Record ID = 96 timestamp = 776048684
Channel ORA_DISK_2: Starting segment 1 from 24-2-12
Channel ORA_DISK_1: Completed segment 1 from month-2 to month-12
Segment handle = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ AUTOBACKUP \ ORCL_96_ORCLXXXX_1212318678.BAK mark = tag20120224t0000046 comment = NONE
Channel ORA_DISK_1: Backup set completed. elapsed time: 00: 00: 02
Channel ORA_DISK_1: deleting archived logs
Archive log file name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ ARCHIVELOG \ arc00149_068451_46.001 Record ID = 94 timestamp = 776048489
Archive log file name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ ARCHIVELOG \ arc00150_068451_46.001 Record ID = 95 timestamp = 776048537
Channel ORA_DISK_2: Completed segment 1 from month-2 to month-12
Segment handle = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ AUTOBACKUP \ ORCL_97_ORCLXXXX_1212318678.BAK mark = tag20120224t0000046 comment = NONE
Channel ORA_DISK_2: Backup set completed. elapsed time: 00: 00: 02
Channel ORA_DISK_2: deleting archived logs
Archive log file name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ ARCHIVELOG \ arc00151_068451_46.001 Record ID = 96 timestamp = 776048684
The backup is completed from 24-2 months to 12 months.


Start backup from 24-2-12
Use channel ORA_DISK_1
Use channel ORA_DISK_2
Channel ORA_DISK_1: Start the compressed backup set for all data files
Channel ORA_DISK_1: Specifies the data file in the backup set.
Input data file fno = 00001 name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSTEM01.DBF
Channel ORA_DISK_1: Starting segment 1 from 24-2-12
Channel ORA_DISK_2: Start the compression of all data file backup Sets
Channel ORA_DISK_2: Specifies the data file in the backup set.
Input data file fno = 00003 name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSAUX01.DBF
Input data file fno = 00002 name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ UNDOTBS01.DBF
Channel ORA_DISK_2: Starting segment 1 from 24-2-12
Channel ORA_DISK_2: Completed segment 1 from month-2 to month-12
Segment handle = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ AUTOBACKUP \ ORCL_99_ORCLXXXX_1212318678.BAK mark = tag20120224t01_50 comment = NONE
Channel ORA_DISK_2: Backup set completed. elapsed time: 00: 00: 46
Channel ORA_DISK_2: Start the compression of all data file backup Sets
Channel ORA_DISK_2: Specifies the data file in the backup set.
Input data file fno = 00004 name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ USERS01.DBF
Channel ORA_DISK_2: Starting segment 1 from 24-2-12
Channel ORA_DISK_1: Completed segment 1 from month-2 to month-12
Segment handle = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ AUTOBACKUP \ ORCL_98_ORCLXXXX_1212318678.BAK mark = tag20120224t01_50 comment = NONE
Channel ORA_DISK_1: Backup set completed. elapsed time: 00: 00: 47
Channel ORA_DISK_1: Start the compressed backup set for all data files
Channel ORA_DISK_1: Specifies the data file in the backup set.
Input data file fno = 00005 name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ EXAMPLE01.DBF
Channel ORA_DISK_1: Starting segment 1 from 24-2-12
Channel ORA_DISK_1: Completed segment 1 from month-2 to month-12
Segment handle = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ AUTOBACKUP \ ORCL_101_ORCLXXXX_1212318678.BAK mark = tag20120224t01_50 comment = NONE
Channel ORA_DISK_1: Backup set completed. elapsed time: 00: 00: 23
Channel ORA_DISK_2: Completed segment 1 from month-2 to month-12
Segment handle = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ AUTOBACKUP \ ORCL_100_ORCLXXXX_1212318678.BAK mark = tag20120224t01_50 comment = NONE
Channel ORA_DISK_2: Backup set completed. elapsed time: 00: 00: 24
The backup is completed from 24-2 months to 12 months.


Start backup from 24-2-12
The current log is archived.
Use channel ORA_DISK_1
Use channel ORA_DISK_2
Channel ORA_DISK_1: Start the compressed archiving log backup set
Channel ORA_DISK_1: archiving logs in the specified backup set
Input archiving log thread = 1 sequence = 152 Record ID = 97 timestamp = 776048761
Channel ORA_DISK_1: Starting segment 1 from 24-2-12
Channel ORA_DISK_1: Completed segment 1 from month-2 to month-12
Segment handle = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ AUTOBACKUP \ ORCL_102_ORCLXXXX_1212318678.BAK tag = TAG20120224T010603 comment = NONE
Channel ORA_DISK_1: Backup set completed. elapsed time: 00: 00: 02
Channel ORA_DISK_1: deleting archived logs
Archive log file name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ ARCHIVELOG \ arc00152_068451_46.001 Record ID = 97 timestamp = 776048761
The backup is completed from 24-2 months to 12 months.


Start Control File and SPFILE Autobackup from 24-2 to 12
Segment handle = E: \ ORACLE \ PRODUCT \ 10.2.0 \ FLASH_RECOVERY_AREA \ ORCL \ AUTOBACKUP \ 2012_02_24 \ o1_mf_s_77601_66_7ndwhzwb_.bkp comment = NONE
Complete Control File and SPFILE Autobackup from month 2 to Month 12.

RMAN>

-- The archivelog file in the Test Library is accidentally deleted, but the file in the control file is still marked as valid (see select name, sequence #, resetlogs_id, archived, deleted, status from v $ archived_log deleted and status columns in the result set). Therefore, when rman is used for archive backup, it is still necessary to back up files that have been accidentally deleted, but the files have been physically deleted, if the disk cannot be found, an error will be reported. You can also see that the file has expired through rman crosscheck archivelog all. Therefore, the archive file is deleted from the control file before backup, and the backup will succeed;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.