ORA-01113: file xxxx needs media recovery
由于规范存储位置以及存储空间调整缘故需要移动表空间MRP_INDEX2的数据文件,如下所示,首先将表空间MRP_INDEX2脱机; 然后复制数据文件;接着重命名数据文件,最后将表空间MRP_INDEX2联机.
在操作过后,最后一步将表空间MRP_INDEX2联机上线时,出现了意外错误信息,如下所示:
SQL> ALTER TABLESPACE MRP_INDEX2 OFFLINE NORMAL;
Tablespace altered.
SQL> !cp /u03/flash_recovery_area/oradata/epps/mrp_index2_x01.dbf /u04/epps/oradata/mrp_index2_x01.dbf
SQL> !cp /u03/flash_recovery_area/oradata/epps/mrp_index2_x02.dbf /u04/epps/oradata/mrp_index2_x02.dbf
SQL> ALTER DATABASE RENAME FILE '/u03/flash_recovery_area/oradata/epps/mrp_index2_x01.dbf' TO '/u04/epps/oradata/mrp_index2_x01.dbf';
Database altered.
如下所示,在重命名文件时,其中一个文件路径'u04/epps/oradata/mrp_index2_x02.dbf'弄错了,当时一直没有留意到这个错误,怕耽搁Tablespace的联机上线时间。于是先将表空间MRP_INDEX2联机上线
SQL> ALTER DATABASE RENAME FILE '/u03/flash_recovery_area/oradata/epps/mrp_index2_x02.dbf' TO 'u04/epps/oradata/mrp_index2_x02.dbf'
*
ERROR at line 1:
ORA-01511: error in renaming log/data files
ORA-01141: error renaming data file 86 - new file
'u04/epps/oradata/mrp_index2_x02.dbf' not found
ORA-01110: data file 86:
'/u03/flash_recovery_area/oradata/epps/mrp_index2_x02.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
SQL> ALTER TABLESPACE MRP_INDEX2 ONLINE ;
Tablespace altered.
检查过后发现了上面脚本错误,于是接着处理,但是将表空间MRP_INDEX2脱机后,没有重新拷贝数据文件过去,直接重命名数据文件(SCN已经改变,导致下面ORA-01113错误),然后表空间联机上线时,出现了下面错误
SQL> ALTER TABLESPACE MRP_INDEX2 OFFLINE NORMAL;
Tablespace altered.
SQL> ALTER DATABASE RENAME FILE '/u03/flash_recovery_area/oradata/epps/mrp_index2_x02.dbf' TO '/u04/epps/oradata/mrp_index2_x02.dbf';
Database altered.
SQL>
SQL> ALTER TABLESPACE MRP_INDEX2 ONLINE ;
ALTER TABLESPACE MRP_INDEX2 ONLINE
*
ERROR at line 1:
ORA-01113: file 86 needs media recovery
ORA-01110: data file 86: '/u04/epps/oradata/mrp_index2_x02.dbf'
解决方法:
1:首先将对应报错的数据文件脱机
SQL> alter database datafile '/u04/epps/oradata/mrp_index2_x02.dbf' offline;
Database altered.
2:其次recover这个数据文件
SQL> alter database recover datafile '/u04/epps/oradata/mrp_index2_x02.dbf';
Database altered.
3:然后将该数据文件联机上线
SQL> alter database datafile '/u04/epps/oradata/mrp_index2_x02.dbf' online;
Database altered.
4:最后将该表空间MRP_INDEX2联机上线。
SQL> ALTER TABLESPACE MRP_INDEX2 ONLINE ;
当然也可以使用RMAN还原,这里感觉使用SQL命令还原要简单方便一点,最后删除拷贝前的文件
rm /u03/flash_recovery_area/oradata/epps/mrp_index2_x01.dbf
rm /u03/flash_recovery_area/oradata/epps/mrp_index2_x02.dbf
ORA-01113: file xxxx needs media recovery的更多相关文章
- ORA-10456:cannot open standby database;media recovery session may be in process
http://neeraj-dba.blogspot.com/2011/10/ora-10456-cannot-open-standby-database.html Once while star ...
- Basic Concepts of Block Media Recovery
Basic Concepts of Block Media Recovery Whenever block corruption has been automatically detected, yo ...
- Background Media Recovery terminated with ORA-1274 after adding a Datafile (Doc ID 739618.1)
APPLIES TO: Oracle Database - Enterprise Edition - Version 9.2.0.1 to 12.1.0.2 [Release 9.2 to 12.1] ...
- ORA-01153: an incompatible media recovery is active
ORA-01153: an incompatible media recovery is active Cause: Attempted to start an incompatible media ...
- 【转】BMR(Block Media Recovery)
关于RMAN的块恢复.Block是oracle数据库最小恢复单位.鉴于此,BMR可以大大缩短恢复的时间,另外,在进行BMR时不需要停掉数据库,可以直接在数据库open状态对数据文件进行恢复,只是需要恢 ...
- Performing User-Managed Database-18.7、Performing Complete User-Managed Media Recovery
18.7.Performing Complete User-Managed Media Recovery 完毕一致性备份,把数据库恢复到当前的scn是最好的结果.能够恢复整个数据库.恢复单个表空间.或 ...
- 诊断:MRP0: Background Media Recovery terminated with error 1111
表现: 灾备环境,无法继续应用日志. 日志: MRP0: Background Media Recovery terminated with error 1111 Fri Jan 18 15:55:2 ...
- (转)RMAN-06054: media recovery requesting unknown archived log for thread...
转自:http://blog.itpub.net/29800581/viewspace-1307267/ 使用rman执行recover database 的时候出现RMAN-06054的错误提示: ...
- 诊断:MRP0: Background Media Recovery process shutdown with error ORA-19909
oracle12c data guard,从库无法应用日志,检查alert日至发现 2019-10-21T14:55:40.087819+08:00 MRP0: Background Media Re ...
随机推荐
- swift 中数据类型那个的转换
在swift中关于数据类型的转换,如果参数是可选类型? 那么打印或者转换的结果 会带有Optional 字样,,
- 用CSS3动画,让页面动起来
以前就听说过有个库,叫animate.css,但是自己并没有在实际项目中使用过,这次正好要做个招聘页面,得以利用一下这个库,在经常会卡顿的UC浏览器中也能流畅执行. 扫描下面的二维码,可以看到在线的d ...
- 【NET MVC】View
通过阅读一些书籍,结合源代码,稍微深入的学习了Asp.Net MVC中的视图View 任何类型的响应都可以利用当前HttpResponse来响应,MVC可以通过Controller的Response属 ...
- 1Z0-053 争议题目解析683
1Z0-053 争议题目解析683 考试科目:1Z0-053 题库版本:V13.02 题库中原题为: 683.Your production database it functional on the ...
- CompoundButton.OnCheckedChangeListener与RadioGroup.OnCheckedChangeListener冲突
当RadioGroup与CompoundButton同时存在且都要监听事件时CompoundButton.OnCheckedChangeListener与RadioGroup.OnCheckedCha ...
- mybatis入门基础(八)-----查询缓存
一.什么是查询缓存 mybatis提供查询缓存,用于减轻数据压力,提高数据库性能. mybaits提供一级缓存,和二级缓存. 1.1. 一级缓存是sqlSession级别的缓存.在操作数据库时需要构造 ...
- byte为什么要与上0xff?
无意间翻看之间的代码,发现了一段难以理解的代码. byte[] bs = digest.digest(origin.getBytes(Charset.forName(charsetName))) ; ...
- jquery改变文本框颜色
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- win7下 VirtualBox虚拟机开机后台自启动
win7下安装个linux虚拟机,学习下非常好. 但是每次使用linux的时候,都是打开virtualBox-->启动安装的linux系统-->再用远程桌面(SSH等)连接 每次手动打开比 ...
- 51nod 算法马拉松18 A 染色问题
染色问题 基准时间限制:1 秒 空间限制:10240 KB 分值: 40 一个n(3<=n<=100)个点的完全图,现在给出n,要求将每条边都染上一种颜色k(1<=k<=n), ...