incremental backup恢复归档GAP的DG的方法本文不再详述,可参照链接:http://yunlongzheng.blog.51cto.com/788996/717249
本文着重讲一次恢复过程中出现的错误的解决方法,给自己备忘,也给需要的人参考。

错误现象:关闭standby数据库,将restore standby controlfile to '/u01/rmanbak/fordg/control01.ctl'恢复出来的控制文件覆盖现有的控制文件,重新启动后出现以下问题:
Sat Mar 23 06:42:37 CST 2013
alter database recover managed standby database disconnect from session using current logfile
Sat Mar 23 06:42:37 CST 2013
Attempt to start background Managed Standby Recovery process (stdby)
MRP0 started with pid=29, OS id=11519
Sat Mar 23 06:42:37 CST 2013
MRP0: Background Managed Standby Recovery process started (stdby)
Sat Mar 23 06:42:37 CST 2013
RFS[2]: Archived Log: '/u01/archivelog/stdby/arc_2_9373_789583539.dbf'
RFS[2]: Archived Log: '/u01/archivelog/stdby/arc_2_9374_789583539.dbf'
RFS[2]: Archived Log: '/u01/archivelog/stdby/arc_2_9375_789583539.dbf'
RFS[2]: Archived Log: '/u01/archivelog/stdby/arc_2_9376_789583539.dbf'
RFS[2]: Archived Log: '/u01/archivelog/stdby/arc_2_9377_789583539.dbf'
RFS[2]: Archived Log: '/u01/archivelog/stdby/arc_2_9378_789583539.dbf'
RFS[2]: Archived Log: '/u01/archivelog/stdby/arc_2_9379_789583539.dbf'
RFS[2]: Archived Log: '/u01/archivelog/stdby/arc_2_9380_789583539.dbf'
Sat Mar 23 06:42:41 CST 2013
RFS[1]: Archived Log: '/u01/archivelog/stdby/arc_1_7751_789583539.dbf'
Sat Mar 23 06:42:42 CST 2013
RFS[2]: Archived Log: '/u01/archivelog/stdby/arc_2_9381_789583539.dbf'
Sat Mar 23 06:42:42 CST 2013
Managed Standby Recovery starting Real Time Apply
Sat Mar 23 06:42:42 CST 2013
Errors in file /u01/app/oracle/admin/stdby/bdump/stdby_dbw0_11458.trc:
ORA-01157: cannot identify/lock data file 24 - see DBWR trace file
ORA-01110: data file 24: '+DATA/in_sz_data'
ORA-17503: ksfdopn:2 Failed to open file +DATA/in_sz_data
ORA-15001: diskgroup "DATA" does not exist or is not mounted
ORA-15077: could not locate ASM instance serving a required diskgroup
ORA-29701: unable to connect to Cluster Manager
Sat Mar 23 06:42:42 CST 2013
Errors in file /u01/app/oracle/admin/stdby/bdump/stdby_dbw0_11458.trc:
ORA-01157: cannot identify/lock data file 25 - see DBWR trace file
ORA-01110: data file 25: '/u01/oradata/stdby/in_sz_data'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Sat Mar 23 06:42:42 CST 2013
Errors in file /u01/app/oracle/admin/stdby/bdump/stdby_dbw0_11458.trc:
ORA-01157: cannot identify/lock data file 26 - see DBWR trace file
ORA-01110: data file 26: '/u01/oradata/stdby/in_sz_data.9154.810742355'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Sat Mar 23 06:42:42 CST 2013
Errors in file /u01/app/oracle/admin/stdby/bdump/stdby_dbw0_11458.trc:
ORA-01157: cannot identify/lock data file 27 - see DBWR trace file
ORA-01110: data file 27: '/u01/oradata/stdby/in_ac_data.9090.810742665'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
MRP0: Background Media Recovery terminated with error 1110
Sat Mar 23 06:42:43 CST 2013
Errors in file /u01/app/oracle/admin/stdby/bdump/stdby_mrp0_11519.trc:
ORA-01110: data file 24: '+DATA/in_sz_data'
ORA-01157: cannot identify/lock data file 24 - see DBWR trace file
ORA-01110: data file 24: '+DATA/in_sz_data'
Managed Standby Recovery not using Real Time Apply
Sat Mar 23 06:42:43 CST 2013
Errors in file /u01/app/oracle/admin/stdby/bdump/stdby_mrp0_11519.trc:
ORA-01110: data file 24: '+DATA/in_sz_data'
ORA-01157: cannot identify/lock data file 24 - see DBWR trace file
ORA-01110: data file 24: '+DATA/in_sz_data'
Sat Mar 23 06:42:43 CST 2013
MRP0: Background Media Recovery process shutdown (stdby)
Sat Mar 23 06:42:43 CST 2013
RFS[2]: Archived Log: '/u01/archivelog/stdby/arc_2_9382_789583539.dbf'
分析:因为主库新建过数据文件,从主库恢复过来的控制文件中中包含了这些文件,而从库却没有这些文件。

解决方法:
执行创建文件:
SQL> alter database create datafile '+DATA/in_sz_data' as '/u01/oradata/stdby/in_sz_data.312.789659222';
Database altered.
SQL> alter database create datafile '/u01/oradata/stdby/in_sz_data' as '/u01/oradata/stdby/in_sz_data.312.789659223';
Database altered.
SQL> alter database create datafile '/u01/oradata/stdby/in_sz_data.9154.810742355' as '/u01/oradata/stdby/in_sz_data.312.789659224';
Database altered.
SQL> alter database create datafile '/u01/oradata/stdby/in_ac_data.9090.810742665' as '/u01/oradata/stdby/in_ac_data.9090.810742665';

再次执行恢复:
RMAN> catalog start with '/u01/rmanbak/fordg/';
 
searching for all files that match the pattern /u01/rmanbak/fordg/
 
List of Files Unknown to the Database
=====================================
File Name: /u01/rmanbak/fordg/standby_STD_20130323_n9o57oao_1_1.bak
File Name: /u01/rmanbak/fordg/control01.ctl
File Name: /u01/rmanbak/fordg/standby_STD_20130323_nbo57oao_1_1.bak
File Name: /u01/rmanbak/fordg/standby_STD_20130323_nfo57p2c_1_1.bak
File Name: /u01/rmanbak/fordg/standby_STD_20130323_nco57oao_1_1.bak
File Name: /u01/rmanbak/fordg/standby_STD_20130323_nao57oao_1_1.bak
File Name: /u01/rmanbak/fordg/standby_STD_20130323_ngo57p2h_1_1.bak
File Name: /u01/rmanbak/fordg/standby_STD_20130323_ndo57ov7_1_1.bak
File Name: /u01/rmanbak/fordg/standby_STD_20130323_neo57p0b_1_1.bak
 
Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done
 
List of Cataloged Files
=======================
File Name: /u01/rmanbak/fordg/standby_STD_20130323_n9o57oao_1_1.bak
File Name: /u01/rmanbak/fordg/control01.ctl
File Name: /u01/rmanbak/fordg/standby_STD_20130323_nbo57oao_1_1.bak
File Name: /u01/rmanbak/fordg/standby_STD_20130323_nfo57p2c_1_1.bak
File Name: /u01/rmanbak/fordg/standby_STD_20130323_nco57oao_1_1.bak
File Name: /u01/rmanbak/fordg/standby_STD_20130323_nao57oao_1_1.bak
File Name: /u01/rmanbak/fordg/standby_STD_20130323_ngo57p2h_1_1.bak
File Name: /u01/rmanbak/fordg/standby_STD_20130323_ndo57ov7_1_1.bak
File Name: /u01/rmanbak/fordg/standby_STD_20130323_neo57p0b_1_1.bak
 
RMAN>

RMAN> RMAN> run {  
allocate channel dsk0 type disk;
allocate channel dsk1 type disk;
allocate channel dsk2 type disk;
restore standby controlfile to '/u01/rmanbak/fordg/control01.ctl';
recover database noredo;
}2> 3> 4> 5> 6> 7>
 
allocated channel: dsk0
channel dsk0: sid=1481 devtype=DISK
 
allocated channel: dsk1
channel dsk1: sid=1480 devtype=DISK
 
allocated channel: dsk2
channel dsk2: sid=1479 devtype=DISK
 
Starting restore at 28-MAR-13
 
channel dsk0: starting datafile backupset restore
channel dsk0: restoring control file
output filename=/u01/rmanbak/fordg/control01.ctl
channel dsk0: reading from backup piece /u01/rmanbak/fordg/standby_STD_20130323_nfo57p2c_1_1.bak
channel dsk0: restored backup piece 1
piece handle=/u01/rmanbak/fordg/standby_STD_20130323_nfo57p2c_1_1.bak tag=FOR STANDBY
channel dsk0: restore complete, elapsed time: 00:00:05
Finished restore at 28-MAR-13
 
Starting recover at 28-MAR-13
channel dsk0: starting incremental datafile backupset restore
channel dsk0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00024: /u01/oradata/stdby/in_sz_data.312.789659222
destination for restore of datafile 00025: /u01/oradata/stdby/in_sz_data.312.789659223
destination for restore of datafile 00026: /u01/oradata/stdby/in_sz_data.312.789659224
destination for restore of datafile 00027: /u01/oradata/stdby/in_ac_data.9090.810742665
channel dsk0: reading from backup piece /u01/rmanbak/inc2_STD_n2o572go_1_1
released channel: dsk0
released channel: dsk1
released channel: dsk2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/28/2013 15:37:14
ORA-19870: error reading backup piece /u01/rmanbak/inc2_STD_n2o572go_1_1
ORA-19505: failed to identify file "/u01/rmanbak/inc2_STD_n2o572go_1_1"
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
 
分析:通过WINDOWS系统FTP上传下载后文件发生了变化,改用NFS传输后恢复正常
顺带下NFS的设置
服务器端:
[root@dgserver stdby]# vi /etc/exports
 
[1]+  Stopped                 vi /etc/exports
[root@dgserver stdby]# vi /etc/exports
[root@dgserver stdby]# /etc/rc.d/init.d/portmap start
Starting portmap:                                          [  OK  ]
[root@dgserver stdby]# /etc/rc.d/init.d/nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
[root@dgserver stdby]# exportfs -rv
exporting *:/u01/rmanbak
[root@dgserver stdby]#

客户端
[root@oracle1 ~]# showmount -e 192.168.13.109
Export list for 192.168.13.109:
/u01/rmanbak *
[root@oracle1 ~]#

RMAN> run {  
allocate channel dsk0 type disk;
allocate channel dsk1 type disk;
allocate channel dsk2 type disk;
restore standby controlfile to '/u01/rmanbak/fordg/control01.ctl';
recover database noredo;
}2> 3> 4> 5> 6> 7>
 
allocated channel: dsk0
channel dsk0: sid=1481 devtype=DISK
 
allocated channel: dsk1
channel dsk1: sid=1480 devtype=DISK
 
allocated channel: dsk2
channel dsk2: sid=1479 devtype=DISK
 
Starting restore at 28-MAR-13
 
control file is already restored to file /u01/rmanbak/fordg/control01.ctl
restore not done; all files readonly, offline, or already restored
Finished restore at 28-MAR-13
 
Starting recover at 28-MAR-13
channel dsk0: starting incremental datafile backupset restore
channel dsk0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00024: /u01/oradata/stdby/in_sz_data.312.789659222
destination for restore of datafile 00025: /u01/oradata/stdby/in_sz_data.312.789659223
destination for restore of datafile 00026: /u01/oradata/stdby/in_sz_data.312.789659224
destination for restore of datafile 00027: /u01/oradata/stdby/in_ac_data.9090.810742665
channel dsk0: reading from backup piece /u01/rmanbak/inc2_STD_n2o572go_1_1
released channel: dsk0
released channel: dsk1
released channel: dsk2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/28/2013 16:32:26
ORA-19870: error reading backup piece /u01/rmanbak/inc2_STD_n2o572go_1_1
ORA-19573: cannot obtain exclusive enqueue for datafile 26

查询该FILE
SQL> select name from v$datafile where file#=26;
 
NAME
--------------------------------------------------------------------------------
/u01/oradata/stdby/in_sz_data.312.789659224
 
SQL>
分析:由于是MOUNT STANDBY方式启动的,决定重启到普通MOUNT状态
SQL> shutdown immediate;
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
 
Total System Global Area 1.9327E+10 bytes
Fixed Size                  2130592 bytes
Variable Size            4362079584 bytes
Database Buffers         1.4948E+10 bytes
Redo Buffers               14643200 bytes
Database mounted.
SQL>

[oracle@dgserver ~]$ rman target /
 
Recovery Manager: Release 10.2.0.5.0 - Production on Thu Mar 28 16:49:28 2013
 
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
 
connected to target database: STD (DBID=1656746419, not open)
 
 
RMAN> run {  
allocate channel dsk0 type disk;
allocate channel dsk1 type disk;
allocate channel dsk2 type disk;
restore standby controlfile to '/u01/rmanbak/fordg/control01.ctl';
recover database noredo;
}2> 3> 4> 5> 6> 7>
 
using target database control file instead of recovery catalog
allocated channel: dsk0
channel dsk0: sid=1481 devtype=DISK
 
allocated channel: dsk1
channel dsk1: sid=1480 devtype=DISK
 
allocated channel: dsk2
channel dsk2: sid=1479 devtype=DISK
 
Starting restore at 28-MAR-13
 
control file is already restored to file /u01/rmanbak/fordg/control01.ctl
restore not done; all files readonly, offline, or already restored
Finished restore at 28-MAR-13
 
Starting recover at 28-MAR-13
channel dsk0: starting incremental datafile backupset restore
channel dsk0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00024: /u01/oradata/stdby/in_sz_data.312.789659222
destination for restore of datafile 00025: /u01/oradata/stdby/in_sz_data.312.789659223
destination for restore of datafile 00026: /u01/oradata/stdby/in_sz_data.312.789659224
destination for restore of datafile 00027: /u01/oradata/stdby/in_ac_data.9090.810742665
channel dsk0: reading from backup piece /u01/rmanbak/inc2_STD_n2o572go_1_1
channel dsk0: restored backup piece 1
piece handle=/u01/rmanbak/inc2_STD_n2o572go_1_1 tag=INC2
channel dsk0: restore complete, elapsed time: 00:24:27
channel dsk0: starting incremental datafile backupset restore
channel dsk0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00024: /u01/oradata/stdby/in_sz_data.312.789659222
destination for restore of datafile 00025: /u01/oradata/stdby/in_sz_data.312.789659223
channel dsk0: reading from backup piece /u01/rmanbak/fordg/standby_STD_20130323_nbo57oao_1_1.bak
channel dsk1: starting incremental datafile backupset restore
channel dsk1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00026: /u01/oradata/stdby/in_sz_data.312.789659224
channel dsk1: reading from backup piece /u01/rmanbak/fordg/standby_STD_20130323_nco57oao_1_1.bak
channel dsk2: starting incremental datafile backupset restore
channel dsk2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00027: /u01/oradata/stdby/in_ac_data.9090.810742665
channel dsk2: reading from backup piece /u01/rmanbak/fordg/standby_STD_20130323_neo57p0b_1_1.bak
channel dsk0: restored backup piece 1
piece handle=/u01/rmanbak/fordg/standby_STD_20130323_nbo57oao_1_1.bak tag=FOR STANDBY
channel dsk0: restore complete, elapsed time: 00:00:03
channel dsk1: restored backup piece 1
piece handle=/u01/rmanbak/fordg/standby_STD_20130323_nco57oao_1_1.bak tag=FOR STANDBY
channel dsk1: restore complete, elapsed time: 00:00:10
channel dsk2: restored backup piece 1
piece handle=/u01/rmanbak/fordg/standby_STD_20130323_neo57p0b_1_1.bak tag=FOR STANDBY
channel dsk2: restore complete, elapsed time: 00:10:35
 
Finished recover at 28-MAR-13
released channel: dsk0
released channel: dsk1
released channel: dsk2
 
RMAN>

incremental backup恢复错误一例相关推荐

  1. 故障:在 Application Log 中出现 ID33152 的 Backup Exec 错误日志

    1.故障现象: 定检一台 Windows Server 2008 的 Symantec Backup Exec 服务器,如果重启该服务器,在 Windows Event Viewer 的 Applic ...

  2. VMWare虚拟机打不开、繁忙无法关闭、不可恢复错误(mks)(不要在虚拟机下用win+L锁屏,不然就繁忙。。。)

    今天电脑突然嗡嗡响,我看资源管理器发现VS占用较大资源,我把VS关了后,发现虚拟机出现不可恢复错误: 然后重启VMVare,发现虚拟机一直打转转起不来, 解决办法: 用管理员杀死,再通过windows ...

  3. LIBCLNTSH.SO: WRONG ELF CLASS: ELFCLASS32错误一例

    http://www.oracledatabase12g.com/archives/libclntsh-so-wrong-elf-class-elfclass32%E9%94%99%E8%AF%AF% ...

  4. Fix My iPhone Mac版:修复iPhone白苹果、黑屏、卡住恢复错误等iOS 15 升级失败

    Fix My iPhone for mac提供快速.即时的解决方案来修复您的 iOS 系统问题,而不会丢失您的 iOS 数据的一个字节,无论您的设备处于恢复模式.白色 Apple 标志.黑屏.启动时循 ...

  5. VMware Workstation不可恢复错误: (vcpu-0)

    环境 : 电脑 :Dell 问题一.VMware Workstation 不可恢复错误: (vcpu-0)vcpu-0:VERIFY vmcore/vmm/main/cpuid.c:382 bugNr ...

  6. vmware workstation不可恢复错误:(vthread-7)

    错误信息如下截图所示,同时我发现只要不管这个错误弹出窗口,虚拟机是可以正常运行的: 解决办法 : 根据提示 找到C:\Users\Administrator\AppData\Local\Temp 全部 ...

  7. VMware报错:VMware Workstation 不可恢复错误: (vmx)

    环境:kali放在移动硬盘中,VM装在电脑上,运行一次后挂起. 问题描述:运行挂起的虚拟机提示: VMware Workstation 不可恢复错误: (vmx)  解决方法: 删除虚拟机安装目录下面 ...

  8. ORA-00600错误一例

    ORA-00600错误一例,一个SQL运行时报ORA-00600的错误. 英文错误信息: ORA-00600: internal error code, arguments: [qkeAddDepen ...

  9. 更新win11后vmware出错,VMware Workstation 不可恢复错误: (vcpu-0)

    更新win11后,vmware无法正常使用了,症状如下:可以打开虚拟机,但是挂起的时候会报错 VMware Workstation 不可恢复错误: (vcpu-0),Exception 0xc0000 ...

最新文章

  1. Quartz Scheduler失火指令说明
  2. 在idea下开发出现404错误
  3. java弱引用在安卓中有效吗_Android 软引用和弱引用详解及实例代码
  4. ES9新特性_ES9正则扩展-反向断言---JavaScript_ECMAScript_ES6-ES11新特性工作笔记055
  5. 修复linux bash破壳漏洞,Linux系统下如何检测并修复bash中的破壳漏洞​​
  6. 「Python」conda与pip升级所有的包
  7. Compilation failed: internal java compiler error
  8. 刷题进阶 -- 剑指Offer、力扣算法题
  9. emWin 2天速成实例教程013_修改BUTTON按钮等控件背景皮肤颜色_SetBkColor
  10. 计算机视频解码测试,无底限测试 入门电脑挑战H.265视频解码
  11. selenium中整个页面的截图及局部截图(方法分析)
  12. 废弃军舰回收站、废铁回炉重造
  13. html body language,关于BODY LANGUAGE
  14. visual assist 工具条不见了
  15. 钉钉中添加回调监听事件
  16. 十款强大的图像后期处理软件和工具
  17. 基于Hi3559A ARM64位嵌入式平台的OpenCV2.4.9+ffmpeg2.0.7移植及应用
  18. 我是怎么成为一名...的
  19. java计算机毕业设计网上扶贫农产品销售系统源码+系统+数据库+lw文档+mybatis+运行部署
  20. 《跟着咩总啃CS:APP》——第0章

热门文章

  1. linux mysql 5.0.45_RedHat糸列Mysql-5.0.45的安装
  2. RabbitMQ死信队列,延时队列
  3. 利用计算思维解决问题人和计算机都能完成,第1课计算机与计算思维.ppt
  4. java网页爬虫xml_基于webmagic的java网页爬虫,抓取网页指定节点,然后使用dom4j分析xml数据...
  5. 深入浅出Spring Security(二):FilterChainProxy的创建过程
  6. Eureka集群搭建,unavailable-replicas服务节点不可用解決方案
  7. 国内好用的5款软件测试管理工具
  8. python电子时钟包装盒_python 电子时钟
  9. 怎么将jsp中var报错_招聘中不得将全日制作为限制性条件,怎么就不公平了?
  10. python2的默认数字类型_伪·从零开始学Python - 2.2.1 基本数据类型 - 整型与浮点型...