1.1.1 RMAN-06556
Date:
Environment: test environment
[Scenario description]
When RMAN is used for full-database backup, but an error is reported when Incomplete recovery is performed, prompting that a data file must be restored earlier than the given SCN.
[Error message]
Back up the database:
RMAN> backup database plus archivelog;
Starting backup at 15:02:13
Current log archived
......
Finished backup at 15:02:15
Starting backup at 15:02:15
Using channel ORA_DISK_1
File 5 is excluded from whole databasebackup
File 8 is excluded from whole databasebackup
File 9 is excluded from whole databasebackup
Channel ORA_DISK_1: starting full datafilebackup set
Channel ORA_DISK_1: specifying datafile (s) in backup set
Input datafile file number = 00001 name =/U01/app/oracle/oradata/testdb/system01.dbf
Input datafile file number = 00002 name =/U01/app/oracle/oradata/testdb/sysaux01.dbf
Input datafile file number = 00003 name =/U01/app/oracle/oradata/testdb/undotbs01.dbf
Input datafile file number = 00007 name =/U01/app/oracle/oradata/testdb/hesper_hq_data01.dbf
Input datafile file number = 00010 name =/U01/app/oracle/oradata/testdb/rcat_data01.dbf
Input datafile file number = 00006 name =/U01/app/oracle/oradata/testdb/testdb01_index.dbf
Input datafile file number = 00004 name =/U01/app/oracle/oradata/testdb/users01.dbf
Channel ORA_DISK_1: starting piece 1 at2014-05-21 15:02:15
......
Channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
Finished backup at 15:03:10
Starting backup at 15:03:10
Current log archived
......
Finished backup at 15:03:12
Starting Control File and SPFILE Autobackupat 15:03:12
Piecehandle =/home/oracle/rman/backup_recovery/testdb_c-2607759728-20140521-01comment = NONE
Finished Control File and SPFILE Autobackupat 15:03:13
RMAN>
Restore:
RMAN> run {
2> allocate channel category type disk;
3> allocate channel ch2 type disk;
4> set until scn 1519297;
5> restore database;
6> recover database;
7> release channel restart;
8> release channel ch2;
9>}
Allocated channel: allocated
Channel identifier: SID = 63 device type = DISK
Allocated channel: ch2
Channel ch2: SID = 129 device type = DISK
Executing command: SET until clause
Starting restore at 15:11:07
File 5 is excluded from whole databasebackup
File 8 is excluded from whole databasebackup
File 9 is excluded from whole databasebackup
Channel resume: starting datafile backup setrestore
Channel stores: specifying datafile (s) torestore from backup set
Channel failed: restoring datafile 00001 to/U01/app/oracle/oradata/testdb/system01.dbf
Channel resume: restoring datafile 00002 to/U01/app/oracle/oradata/testdb/sysaux01.dbf
Channel failed: restoring datafile 00003 to/U01/app/oracle/oradata/testdb/undotbs01.dbf
Channel failed: restoring datafile 00004 to/U01/app/oracle/oradata/testdb/users01.dbf
Channel failed: restoring datafile 00006 to/U01/app/oracle/oradata/testdb/testdb01_index.dbf
Channel Layout: restoring datafile 00007 to/U01/app/oracle/oradata/testdb/hesper_hq_data01.dbf
Channel failed: restoring datafile 00010 to/U01/app/oracle/oradata/testdb/rcat_data01.dbf
Channel Layout: reading from backup piece/U01/app/test/rman/fra/TESTDB/backupset/2014_05_21/o1_mf_nnndf_TAG20140521T150215_9qrmvr0y _. bkp
Channel Layout: piecehandle =/U01/app/test/rman/fra/TESTDB/backupset/2014_05_21/container _. bkptag = TAG20140521T150215
Channel priority: restored backup piece 1
Channel complete: restore complete, elapsedtime: 00:00:55
Failover to previous backup
Finished restore at 2014-05-21 15:12:02
Starting recover at 15:12:02
Released channel: released
Released channel: ch2
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error messagestack follows ======================
RMAN-00571: ========================================================== ==============================
RMAN-03002: failure of recover command at05/21/2014 15:12:02
RMAN-06556: datafile 5 must be restoredfrom backup older than SCN 1519297
RMAN>
[Error cause]
Observe the output information of the backup process and restoration process, and you will find three records:
File5 is excluded from whole database backup
File8 is excluded from whole database backup
File9 is excluded from whole database backup
This means that file 5, 8, and 9 are not backed up or restored.
[Solution]
Modify the exclusion rules in the RMAN backup policy
Before modification:
Configure exclude for tablespace 'testdb _ data ';
After modification:
RMAN> configure exclude for tablespace 'testdb _ data' clear;
Tablespace TESTDB_DATA will be supported ded infuture whole database backups
Old RMAN configuration parameters aresuccessfully deleted
RMAN>
View the tablespace backup policy (INCLUDED_IN_DATABASE_BACKUP ):
SQL> select * from v $ tablespace order by3;
TS # NAME INC BIG FLAENC
-------------------------------------
3 TEMP NO YES
1 SYSAUX YES NO YES
2 UNDOTBS1 YES NO YES
4 USERS YES NO YES
9 RCAT_DATA YES NO YES
6 TESTDB_DATA YES NO YES
7 TESTDB_INDEX YES NO YES
8 HESPER_HQ YES NO YES
0 SYSTEM YES NO YES
9 rows selected.