首页 > 数据库技术 > 详细

【oracle案例】RMAN-06556

时间:2014-05-23 01:56:48      阅读:1079      评论:0      收藏:0      [点我收藏+]

1.1.1. RMAN-06556

日期:2014-05-21 16:33

环境:测试环境

 

【情景描述】

使用RMAN进行了全库备份,但是在进行不完全恢复的时候遇到报错,提示某个数据文件必须从比给出的SCN更早的备份中恢复。

 

【报错信息】

备份数据库:

RMAN> backup database plus archivelog;

 

Starting backup at 2014-05-21 15:02:13

current log archived

......

Finished backup at 2014-05-21 15:02:15

 

Starting backup at 2014-05-21 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=00001name=/U01/app/oracle/oradata/testdb/system01.dbf

input datafile file number=00002name=/U01/app/oracle/oradata/testdb/sysaux01.dbf

input datafile file number=00003name=/U01/app/oracle/oradata/testdb/undotbs01.dbf

input datafile file number=00007name=/U01/app/oracle/oradata/testdb/hesper_hq_data01.dbf

input datafile file number=00010name=/U01/app/oracle/oradata/testdb/rcat_data01.dbf

input datafile file number=00006name=/U01/app/oracle/oradata/testdb/testdb01_index.dbf

input datafile file number=00004name=/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 2014-05-21 15:03:10

 

Starting backup at 2014-05-21 15:03:10

current log archived

......

Finished backup at 2014-05-21 15:03:12

 

Starting Control File and SPFILE Autobackupat 2014-05-21 15:03:12

piecehandle=/home/oracle/rman/backup_recovery/testdb_c-2607759728-20140521-01comment=NONE

Finished Control File and SPFILE Autobackupat 2014-05-21 15:03:13

 

RMAN>

 

还原恢复:

RMAN> run {

2> allocate channel ch1 type disk;

3> allocate channel ch2 type disk;

4> set until scn 1519297;

5> restore database;

6> recover database;

7> release channel ch1;

8> release channel ch2;

9> }

 

allocated channel: ch1

channel ch1: SID=63 device type=DISK

 

allocated channel: ch2

channel ch2: SID=129 device type=DISK

 

executing command: SET until clause

 

Starting restore at 2014-05-21 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 ch1: starting datafile backup setrestore

channel ch1: specifying datafile(s) torestore from backup set

channel ch1: restoring datafile 00001 to/U01/app/oracle/oradata/testdb/system01.dbf

channel ch1: restoring datafile 00002 to/U01/app/oracle/oradata/testdb/sysaux01.dbf

channel ch1: restoring datafile 00003 to/U01/app/oracle/oradata/testdb/undotbs01.dbf

channel ch1: restoring datafile 00004 to/U01/app/oracle/oradata/testdb/users01.dbf

channel ch1: restoring datafile 00006 to/U01/app/oracle/oradata/testdb/testdb01_index.dbf

channel ch1: restoring datafile 00007 to/U01/app/oracle/oradata/testdb/hesper_hq_data01.dbf

channel ch1: restoring datafile 00010 to/U01/app/oracle/oradata/testdb/rcat_data01.dbf

channel ch1: reading from backup piece/U01/app/test/rman/fra/TESTDB/backupset/2014_05_21/o1_mf_nnndf_TAG20140521T150215_9qrmvr0y_.bkp

channel ch1: piecehandle=/U01/app/test/rman/fra/TESTDB/backupset/2014_05_21/o1_mf_nnndf_TAG20140521T150215_9qrmvr0y_.bkptag=TAG20140521T150215

channel ch1: restored backup piece 1

channel ch1: restore complete, elapsedtime: 00:00:55

failover to previous backup

 

Finished restore at 2014-05-21 15:12:02

 

Starting recover at 2014-05-21 15:12:02

released channel: ch1

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>

 

【报错原因】

仔细观察备份过程和还原恢复过程的输出信息,会发现里面包含3条信息记录:

         file5 is excluded from whole database backup

         file8 is excluded from whole database backup

         file9 is excluded from whole database backup

意思是说file 5、8、9没有进行备份,也没有进行还原恢复。

 

【解决方法】

修改RMAN备份策略中的排除规则

修改前:

CONFIGURE EXCLUDE FOR TABLESPACE‘TESTDB_DATA‘;

修改后:

RMAN> CONFIGURE EXCLUDE FOR TABLESPACE‘TESTDB_DATA‘ clear;

Tablespace TESTDB_DATA will be included infuture whole database backups

old RMAN configuration parameters aresuccessfully deleted

RMAN>

 

查看表空间备份策略(INCLUDED_IN_DATABASE_BACKUP):

SQL> select * from v$tablespace order by3;

 

      TS# NAME            INC BIG FLAENC

---------- --------------- --- --- --- ---

        3 TEMP            NO  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.


【oracle案例】RMAN-06556,布布扣,bubuko.com

【oracle案例】RMAN-06556

原文:http://blog.csdn.net/jason_asia/article/details/26486823

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!