I'm trying using RMAN to create and restore backups. I'm getting an error stack trace when trying to restore to one of the backups that I have made. The error is
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/01/2016 11:52:10
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 30 and starting SCN of 2586064415
My backup RMAN script is as follows, and is run through an application where the parameters are filled in correctly.:
configure channel device type disk clear;
run {{
allocate channel ch1 type Disk FORMAT '{0}\\BCKUP_%U' ;
backup incremental level {1} database plus archivelog tag '{2}' ;
backup spfile FORMAT '{0}\\SPFILE_%U' tag '{2}';
backup current controlfile FORMAT '{0}\\CTRL_%U' tag '{2}';
}}
My restore script is:
run{
shutdown immediate
STARTUP FORCE NOMOUNT;
RESTORE CONTROLFILE FROM '...path to control file backup...';
ALTER DATABASE MOUNT;
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN RESETLOGS;
}
I can restore to the most recent backup just fine, but when I try to take another step back to one made prior I receive that error. Is there something in my script for either creating the backup or restoring that needs to change?
Files Created by backup:
Side Note: I run ALTER DATABASE OPEN RESETLOGS
after I get the error and everything is working fine and dandy. The problem though, is that the application that will eventually do the restore will see the error message stack and classify it as a failed restore.
Parameters:
- {0}:
\\192.168.xxx.xxx\c$\backups\20160201_104531_INCREMENTAL\
(depending on backup type its INCREMENTAL or ONLINE_FULL) - {1}:
0/1
(depending on level) - {2}:
INC_20160201_104531
(depending on backup type it's INC or FULL) - The control file backup loc:
\\192.168.xxx.xxx\C$\BACKUPS\20160201_104814_INCREMENTAL\CTRL_0IQSQVKP_1_1