因incarnation导致恢复时出现RMAN-06026错误

正常恢复控制文件并MOUNT数据库
环境:
生产环境进行备份数据库、控制文件
测试环境在之前执行过异机恢复任务,并进行过RESETLOGS操作,并遗留下每次RESETLOGS后的归档日志。

在使用生产环境的备份进行恢复时,报错:
RMAN-06026: some targets not found - aborting restore
RMAN-06100: no channel to


故障现象:
RMAN> restore database; --->此时进行恢复,报错检测此时RMAN-06026

Starting restore at 12-JUN-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=156 devtype=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/12/2016 14:27:13
RMAN-06026: some targets not found - aborting restore
RMAN-06100: no channel to restore a backup or copy of datafile 7
RMAN-06100: no channel to restore a backup or copy of datafile 6
RMAN-06100: no channel to restore a backup or copy of datafile 5
RMAN-06100: no channel to restore a backup or copy of datafile 4
RMAN-06100: no channel to restore a backup or copy of datafile 3
RMAN-06100: no channel to restore a backup or copy of datafile 2
RMAN-06100: no channel to restore a backup or copy of datafile 1

使用生产环境的备份手动传输到本地时遇到此问题,使用带库(保存15天备份集)时则去查找5/29号的备份。

----------------排查过程
1.查看此时ALERT日志:
Sun Jun 12 13:18:38 2016
Starting ORACLE instance (normal)
……………………省略实例启动的输出
Sun Jun 12 13:18:39 2016
alter database mount  --->RMAN中进行恢复控制文件restore controlfile from '/oracle/ctlbak'并发出MOUNT命令
Sun Jun 12 13:18:43 2016
Setting recovery target incarnation to 2  --->控制文件中记录的incarnation信息
Sun Jun 12 13:18:43 2016
Successful mount of redo thread 1, with mount id 2622485423
Sun Jun 12 13:18:43 2016
Database mounted in Exclusive Mode
Completed: alter database mount
Sun Jun 12 13:20:52 2016
New incarnation branch detected in ArchiveLog, filename /oracle/product/10.2.0/flash_recovery_area/TESTA/archivelog/2016_05_30/o1_mf_
1_1_cnsfxbfv_.arc
Inspection of file changed rdi from 2 to 3  --->检测到闪回区中的归档信息,incarnation信息增加
Setting recovery target incarnation to 3
Sun Jun 12 13:20:52 2016
Setting recovery target incarnation to 3
Setting recovery target incarnation to 3
Sun Jun 12 13:20:52 2016
New incarnation branch detected in ArchiveLog, filename /oracle/product/10.2.0/flash_recovery_area/TESTA/archivelog/2016_06_09/o1_mf_
1_1_comr5bsb_.arc
Inspection of file changed rdi from 3 to 4--->检测到闪回区中的归档信息,incarnation信息增加
Setting recovery target incarnation to 4
Sun Jun 12 13:20:52 2016



2.RMAN中信息的查询:
RMAN> list incarnation; --->检测此时incarnation信息

using target database control file instead of recovery catalog

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       TESTA   2458714232       PARENT  1          22-JUL-05
2       2       TESTA   2458714232       PARENT  551299     07-MAY-11
3       3       TESTA   2458714232       PARENT  100554368532 30-MAY-16
4       4       TESTA   2458714232       CURRENT 100913181743 09-JUN-16

3.对RESTORE命令进行TRACE并分析:
rman target / debug trace=/oracle/olm/rman_debug
登陆后执行:RMAN> restore database;
TRACE文件内容分析:--259行
DBGMISC:  ENTERED krmice [14:34:31.468]
DBGMISC:   command to be compiled and executed is: restore  [14:34:31.468] (krmice)
DBGMISC:   command after this command is: NONE  [14:34:31.468] (krmice)
DBGMISC:   current incarnation does not matter for restore [14:34:31.468] (krmice)
DBGMISC:   ENTERED krmkcrsr [14:34:31.468]


解决办法:
1.第一步MOVE或删除闪回区的归档
2.删除已经恢复的控制文件,重新对控制文件进行恢复。
此时观察ALRET日志中信息,未出现有“检测到闪回区中的归档信息,incarnation信息增加”的情况。
Sun Jun 12 14:44:26 2016
alter database mount
Sun Jun 12 14:44:30 2016
Setting recovery target incarnation to 2
Sun Jun 12 14:44:30 2016
Successful mount of redo thread 1, with mount id 2622505418
Sun Jun 12 14:44:30 2016
Database mounted in Exclusive Mode
Completed: alter database mount
Sun Jun 12 14:46:34 2016
Full restore complete of datafile 2

3.此时进行RECOVER操作,可以正常进行。
后续实验中发现,归档放在非闪回区时,没有这个问题。




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值