MAN> restore database from tag "TAG20141120T184440";
Starting restore at 26-NOV-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=316 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=315 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=317 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=318 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/26/2014 12:25:55
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 257 found to restore
RMAN-06023: no backup or copy of datafile 256 found to restore
RMAN-06023: no backup or copy of datafile 255 found to restore
RMAN-06023: no backup or copy of datafile 254 found to restore
RMAN-06023: no backup or copy of datafile 253 found to restore
RMAN-06023: no backup or copy of datafile 252 found to restore
RMAN-06023: no backup or copy of datafile 251 found to restore
.....
...
..
一开始认为是备份集或脚本的问题,各种方法去验证备份集和脚本,发现都没有问题,后来发现是incarnation的问题
查看incarnation
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 PROD 109431336 PARENT 71120748 Sep 14 2009 23:49:21
2 2 PROD 109431336 PARENT 71126589 Sep 14 2009 23:50:00
3 3 PROD 109431336 PARENT 200149578 Jan 11 2010 23:40:19
4 4 PROD 109431336 CURRENT 133578841218 Oct 28 2014 09:39:02
恢复到incarnation 3
RMAN>reset database to incarnation 3;
成功恢复
RMAN> restore database from tag "TAG20141120T184440";
incarnation(化身)解释:
---------incarnation 1------->
|
---------incarnation 2------>
|
-----------incarnation 3---->
-------------------------------SCN------------------------------------------>
每一个incarnation都是一个不同的版本,每一次resetlogs 就会使 incarnation + 1,
要想做不完全恢复时,一定要了解备份介质是在哪一个incarnation基础上做的备份。
这个特性有点类似于vmware的快照功能(没有用过的同学可能就不知了)
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26474945/viewspace-1353041/
,如需转载,请注明出处,否则将追究法律责任。