RMAN-06059
RMAN-06059 means that the archived logs you expect to use are missing from where they should be. In my case, when I tried to backup a database plus archived logs, I got RMAN-06059 like this:
RMAN> run {
allocate channel d1 type disk format '/backup/%d_%I_%U';
backup database plus archivelog;
delete obsolete;
release channel d1;
}2> 3> 4> 5> 6>
using target database control file instead of recovery catalog
allocated channel: d1
channel d1: SID=144 device type=DISK
Starting backup at 03-JUL-19
current log archived
released channel: d1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 07/03/2019 15:19:09
RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
ORA-19625: error identifying file /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2019_04_03/o1_mf_1_41_gb8my21c_.arc
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Solutions
For solving RMAN-06059, there're two scenarios for you to choose.
A. When Archived logs are Needed
If you need those archived logs, you have to find them out and then do either actions of the followings:
- Move them back to the directory where they should be.
- Catalog start with the directory where they currently are.
Moving back missing archived logs is the most formal way to solve it, but sometimes you may not know their original homes or you wouldn't like to do it. You can do next option.
Cataloging them can make controlfile knows where to find archived logs.
RMAN> catalog start with '/backup_temp/';
searching for all files that match the pattern /backup_temp/
List of Files Unknown to the Database
=====================================
File Name: /backup_temp/o1_mf_1_46_gkrodxdt_.arc
File Name: /backup_temp/o1_mf_1_44_gkro6vvf_.arc
File Name: /backup_temp/o1_mf_1_47_gkrodxxt_.arc
File Name: /backup_temp/o1_mf_1_42_gbdrwjo4_.arc
File Name: /backup_temp/o1_mf_1_43_gkp0kdp5_.arc
File Name: /backup_temp/o1_mf_1_41_gb8my21c_.arc
File Name: /backup_temp/o1_mf_1_45_gkrodvrw_.arc
Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /backup_temp/o1_mf_1_46_gkrodxdt_.arc
File Name: /backup_temp/o1_mf_1_44_gkro6vvf_.arc
File Name: /backup_temp/o1_mf_1_47_gkrodxxt_.arc
File Name: /backup_temp/o1_mf_1_42_gbdrwjo4_.arc
File Name: /backup_temp/o1_mf_1_43_gkp0kdp5_.arc
File Name: /backup_temp/o1_mf_1_41_gb8my21c_.arc
File Name: /backup_temp/o1_mf_1_45_gkrodvrw_.arc
For 9i database, we don't have CATALOG START WITH, but we have CATALOG ARCHIVELOG. You can see an example in the following post: How to Restore Archivelog to Different Location.
B. When Archived logs are NOT Needed
If you don't need those archived logs, you can delete them from the list. First, perform a crosscheck.
RMAN> crosscheck archivelog all;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=144 device type=DISK
...
validation failed for archived log
archived log file name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2019_04_03/o1_mf_1_41_gb8my21c_.arc RECID=35 STAMP=1004624194
...
And then abandon them.
RMAN> delete noprompt expired archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=144 device type=DISK
List of Archived Log Copies for database with db_unique_name ORCL
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - ---------
35 1 41 X 31-OCT-18
Name: /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2019_04_03/o1_mf_1_41_gb8my21c_.arc
...
deleted archived log
archived log file name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2019_04_03/o1_mf_1_41_gb8my21c_.arc RECID=35 STAMP=1004624194
...
Deleted 7 EXPIRED objects
Now you can proceed your actions.
For NetBackup Status 6 error in RMAN, it's the same root cause as we described in this post.