新网创想网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
在RMAN 异机恢复过程中,我第一做了一个不完全恢复,,然后再恢复的时候提示一下错误:
创新互联专业为企业提供望花网站建设、望花做网站、望花网站设计、望花网站制作等企业网站建设、网页设计与制作、望花企业网站模板建站服务,十余年望花做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。
Starting restore at 29-DEC-15
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/29/2015 16:56:34
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
检查备份文件,发现都是存在的,根本没有问题。最后检查发现是incarnation的问题,因为中间我对该数据库做了一次不完全恢复,做了resetlogs操作。
解决办法:
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 CWERPDB 490184294 PARENT 1 24-AUG-13
2 2 CWERPDB 490184294 PARENT 925702 27-JUL-15
3 3 CWERPDB 490184294 CURRENT 12939483587242 24-DEC-15
RMAN> reset database to incarnation 2;
database reset to incarnation 2
run
{set newname for datafile 4 to "/home/u01/oracle/oradata/CWERPDB/users.259.886161065";
set newname for datafile 3 to "/home/u01/oracle/oradata/CWERPDB/undotbs1.258.886161065";
set newname for datafile 2 to "/home/u01/oracle/oradata/CWERPDB/sysaux.257.886161065";
set newname for datafile 1 to "/home/u01/oracle/oradata/CWERPDB/system.256.886161065";
set newname for datafile 5 to "/home/u01/oracle/oradata/CWERPDB/proframe.dbf";
set newname for datafile 6 to "/home/u01/oracle/oradata/CWERPDB/proframe01.dbf";
set newname for datafile 7 to "/home/u01/oracle/oradata/CWERPDB/cosmos_in01.dbf";
set newname for datafile 8 to "/home/u01/oracle/oradata/CWERPDB/cosmos_in02.dbf";
set newname for datafile 9 to "/home/u01/oracle/oradata/CWERPDB/cosmos_in03.dbf";
set newname for datafile 10 to "/home/u01/oracle/oradata/CWERPDB/cosmos01.dbf";
set newname for datafile 11 to "/home/u01/oracle/oradata/CWERPDB/cosmos02.dbf";
set newname for datafile 12 to "/home/u01/oracle/oradata/CWERPDB/cosmos03.dbf";
set newname for datafile 13 to "/home/u01/oracle/oradata/CWERPDB/APPORACLEORADATAPGSCMEXAMPLE01.DBF";
set newname for datafile 14 to "/home/u01/oracle/oradata/CWERPDB/statlog.dbf";
restore database;
3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> switch datafile all;}
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 29-DEC-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00008 to /home/u01/oracle/oradata/CWERPDB/cosmos_in02.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/level0/data_3iqq1v45_1_1.bak
channel ORA_DISK_1: piece handle=/home/oracle/level0/data_3iqq1v45_1_1.bak tag=DB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:35
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00009 to /home/u01/oracle/oradata/CWERPDB/cosmos_in03.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/level0/data_3jqq1v45_1_1.bak
channel ORA_DISK_1: piece handle=/home/oracle/level0/data_3jqq1v45_1_1.bak tag=DB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:35
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00010 to /home/u01/oracle/oradata/CWERPDB/cosmos01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/level0/data_3kqq1v48_1_1.bak
channel ORA_DISK_1: piece handle=/home/oracle/level0/data_3kqq1v48_1_1.bak tag=DB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:45
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00011 to /home/u01/oracle/oradata/CWERPDB/cosmos02.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/level0/data_3lqq1v48_1_1.bak
channel ORA_DISK_1: piece handle=/home/oracle/level0/data_3lqq1v48_1_1.bak tag=DB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:35
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00012 to /home/u01/oracle/oradata/CWERPDB/cosmos03.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/level0/data_3mqq1v4n_1_1.bak
channel ORA_DISK_1: piece handle=/home/oracle/level0/data_3mqq1v4n_1_1.bak tag=DB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:05
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00007 to /home/u01/oracle/oradata/CWERPDB/cosmos_in01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/level0/data_3oqq1v4v_1_1.bak
channel ORA_DISK_1: piece handle=/home/oracle/level0/data_3oqq1v4v_1_1.bak tag=DB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:05
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00005 to /home/u01/oracle/oradata/CWERPDB/proframe.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/level0/data_3nqq1v4n_1_1.bak
channel ORA_DISK_1: piece handle=/home/oracle/level0/data_3nqq1v4n_1_1.bak tag=DB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:07:05
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00006 to /home/u01/oracle/oradata/CWERPDB/proframe01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/level0/data_3pqq1v52_1_1.bak
channel ORA_DISK_1: piece handle=/home/oracle/level0/data_3pqq1v52_1_1.bak tag=DB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:06:25
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /home/u01/oracle/oradata/CWERPDB/system.256.886161065
channel ORA_DISK_1: restoring datafile 00002 to /home/u01/oracle/oradata/CWERPDB/sysaux.257.886161065
channel ORA_DISK_1: restoring datafile 00003 to /home/u01/oracle/oradata/CWERPDB/undotbs1.258.886161065
channel ORA_DISK_1: restoring datafile 00004 to /home/u01/oracle/oradata/CWERPDB/users.259.886161065
channel ORA_DISK_1: restoring datafile 00013 to /home/u01/oracle/oradata/CWERPDB/APPORACLEORADATAPGSCMEXAMPLE01.DBF
channel ORA_DISK_1: restoring datafile 00014 to /home/u01/oracle/oradata/CWERPDB/statlog.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/level0/data_3qqq1vfr_1_1.bak
channel ORA_DISK_1: piece handle=/home/oracle/level0/data_3qqq1vfr_1_1.bak tag=DB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:15
Finished restore at 29-DEC-15
datafile 1 switched to datafile copy
input datafile copy RECID=15 STAMP=899746532 file name=/home/u01/oracle/oradata/CWERPDB/system.256.886161065
datafile 2 switched to datafile copy
input datafile copy RECID=16 STAMP=899746532 file name=/home/u01/oracle/oradata/CWERPDB/sysaux.257.886161065
datafile 3 switched to datafile copy
input datafile copy RECID=17 STAMP=899746532 file name=/home/u01/oracle/oradata/CWERPDB/undotbs1.258.886161065
datafile 4 switched to datafile copy
input datafile copy RECID=18 STAMP=899746532 file name=/home/u01/oracle/oradata/CWERPDB/users.259.886161065
datafile 5 switched to datafile copy
input datafile copy RECID=19 STAMP=899746532 file name=/home/u01/oracle/oradata/CWERPDB/proframe.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=20 STAMP=899746532 file name=/home/u01/oracle/oradata/CWERPDB/proframe01.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=21 STAMP=899746533 file name=/home/u01/oracle/oradata/CWERPDB/cosmos_in01.dbf
datafile 8 switched to datafile copy
input datafile copy RECID=22 STAMP=899746533 file name=/home/u01/oracle/oradata/CWERPDB/cosmos_in02.dbf
datafile 9 switched to datafile copy
input datafile copy RECID=23 STAMP=899746533 file name=/home/u01/oracle/oradata/CWERPDB/cosmos_in03.dbf
datafile 10 switched to datafile copy
input datafile copy RECID=24 STAMP=899746533 file name=/home/u01/oracle/oradata/CWERPDB/cosmos01.dbf
datafile 11 switched to datafile copy
input datafile copy RECID=25 STAMP=899746533 file name=/home/u01/oracle/oradata/CWERPDB/cosmos02.dbf
datafile 12 switched to datafile copy
input datafile copy RECID=26 STAMP=899746534 file name=/home/u01/oracle/oradata/CWERPDB/cosmos03.dbf
datafile 13 switched to datafile copy
input datafile copy RECID=27 STAMP=899746534 file name=/home/u01/oracle/oradata/CWERPDB/APPORACLEORADATAPGSCMEXAMPLE01.DBF
datafile 14 switched to datafile copy
input datafile copy RECID=28 STAMP=899746534 file name=/home/u01/oracle/oradata/CWERPDB/statlog.dbf
RMAN> alter database open;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 12/29/2015 17:36:35
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 12/29/2015 17:36:42
ORA-01152: file 5 was not restored from a sufficiently old backup
ORA-01110: data file 5: '/home/u01/oracle/oradata/CWERPDB/proframe.dbf'
RMAN> recover database;
Starting recover at 29-DEC-15
using channel ORA_DISK_1
starting media recovery
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2710
channel ORA_DISK_1: reading from backup piece /home/oracle/level0/arc_CWERPDBx_20151229_3tqq1vj0_1_1
channel ORA_DISK_1: piece handle=/home/oracle/level0/arc_CWERPDBx_20151229_3tqq1vj0_1_1 tag=TAG20151229T164208
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/home/u01/oracle/fast_recovery_area/CWERPDB/CWERPDB/archivelog/2015_12_29/o1_mf_1_2710_c84o213s_.arc thread=1 sequence=2710
channel default: deleting archived log(s)
archived log file name=/home/u01/oracle/fast_recovery_area/CWERPDB/CWERPDB/archivelog/2015_12_29/o1_mf_1_2710_c84o213s_.arc RECID=2730 STAMP=899746625
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2711
channel ORA_DISK_1: reading from backup piece /home/oracle/level0/arc_CWERPDBx_20151229_3uqq1vj0_1_1
channel ORA_DISK_1: piece handle=/home/oracle/level0/arc_CWERPDBx_20151229_3uqq1vj0_1_1 tag=TAG20151229T164208
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/home/u01/oracle/fast_recovery_area/CWERPDB/CWERPDB/archivelog/2015_12_29/o1_mf_1_2711_c84o23go_.arc thread=1 sequence=2711
channel default: deleting archived log(s)
archived log file name=/home/u01/oracle/fast_recovery_area/CWERPDB/CWERPDB/archivelog/2015_12_29/o1_mf_1_2711_c84o23go_.arc RECID=2731 STAMP=899746627
unable to find archived log
archived log thread=1 sequence=2712
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 12/29/2015 17:37:09
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 2712 and starting SCN of 12939484174407
RMAN> alter database open resetlogs;
database opened