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]
Information in this document applies to any platform.
***Checked for relevance on 26-Sep-2012***
***Checked for relevance on 8-Jul-2015***
SYMPTOMS
Adding a Tablespace / Datafile in Primary Database causes the MRP in Physical Standby Database to terminate with the Error below. STANDBY_FILE_MANAGEMENT = MANUAL is set on the Standby Database.
ORA-01274: cannot add datafile '...dbf' - file could not be created
In Unix Environment you will get the below Message when try to restart the MRP
BEST Practice,
Keep the STANDBY_FILE_MANAGEMENT in AUTO.
CAUSE
This Error occurs if we add a Datafile OR Tablespace in PRIMARY Database and that could not be translated to the Standby Database due to these Reasons:
- Standby_file_management is set to MANUAL
- Primary & Physical Standby are having different file structures and DB_FILE_NAME_CONVERT is not set according to the Directory Structures in Primary and Standby
- Insufficient Space or wrong Permissions on the Standby Database to create the Datafile
- If standby_file_management is set to Auto ,but directory path of Primary and standby are different , db_file_name_convert is not set ,but db_create_file_dest has been set to wrong value on standby.
The Redo Log generated from Primary will have Information about the Tablespace / Datafile added however it could not be created successfully in Physical Standby Database due to the standby_file_management = MANUAL
or is not able to find the specified Folder due to a missing / incorrect Filename Conversion.
The File Entry is added to Standby Controlfile as "UNNAMED0000n" in /dbs or /database
folder depends on the Operating System and eventually the MRP terminates.
=================================================================
File #5 added to control file as 'UNNAMED00005' because
the parameter STANDBY_FILE_MANAGEMENT is set to MANUAL
The file should be manually created to continue.
MRP0: Background Media Recovery terminated with error 1274
Thu Sep 25 19:02:35 2008
Errors in file c:\oracle\product\10.2.0\admin\mystd\bdump\mystd_mrp0_3436.trc:
ORA-01274: cannot add datafile 'D:\ORADATA\PRIM\SALES01.DBF' - file could not be created
By default it is AUTO by broker.
SOLUTION
Perform all mentioned Steps on the Standby Database:
For version < 12c
Step 1: Ensure the standby_file_management = 'MANUAL.
NOTE : For the parameter db_file_name_convert change if the Data Guard Broker is enabled then edit the Parameters using the Broker
DGMGRL>edit database '<standby>' set property StandbyFileManagement=manual;
By default StandbyFileManagement is AUTO by broker.
Step 2: Identify the File which is "unnamedn"
NAME
--------------------------------------------------------------------------------
D:\ORADATA\MYSTD\SYSTEM.DBF
D:\ORADATA\MYSTD\UNDO.DBF
D:\ORADATA\MYSTD\SYSAUX.DBF
D:\ORADATA\MYSTD\SERVICE01.DBF
C:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UNNAMED00005
Step 3: Rename/create the Datafile to the correct Filename
If the standby is in ASM + OMF then use the below command,
or
Step 4: Verify the Filename is correct
NAME
--------------------------------------------------------------------------------
D:\ORADATA\MYSTD\SYSTEM.DBF
D:\ORADATA\MYSTD\UNDO.DBF
D:\ORADATA\MYSTD\SYSAUX.DBF
D:\ORADATA\MYSTD\SERVICE01.DBF
D:\ORADATA\MYSTD\SALES01.DBF
Step 5: Change the STANDBY_FILE_MANAGMENT to AUTO
Step 6: Start the MRP (this is using Real Time Apply)
Database altered.
Step 7: Verify the MRP is running as expected
--------- ------------ ----------
ARCH CLOSING 99
ARCH CLOSING 103
MRP0 APPLYING_LOG 104
RFS IDLE 0
RFS IDLE 0
RFS IDLE 104
For 12c Database with PDBs :-
Step 1: Ensure the standby_file_management = 'MANUAL'
DGMGRL>edit database '<standby>' set property DbFileNameConvert='<>','<>';
DGMGRL>edit database '<standby>' set property StandbyFileManagement=manual;
Step 2:- Identify the Pdb with datafile name UNNAMED
column name format a50
column pdb_name format a8
select a.file#,a.name,a.con_id,b.pdb_id,b.pdb_name from v$datafile a,dba_pdbs b where a.con_id=b.con_id and a.name like '%UNNAM%';
Step 3:- Set the container to that pdb
In Below example assuming pdb1 is the container
SQL> alter session set container = pdb1;
Session altered.
FILE# NAME CON_ID PDB_ID PDB_NAME
--------- -------------------------------------------------- ---------- ---------- --------
5 D:\ORADATA\MYSTD\UNNAMED00005 3 3 PDB1
SQL> alter pluggable database pdb1 CREATE DATAFILE 'D:\ORADATA\MYSTD\UNNAMED00005' as 'D:\ORADATA\MYSTD\SP385343393_ess.dbf';
Pluggable database altered.
Step 4-7 are same as listed for version < 12c
Background Media Recovery terminated with ORA-1274 after adding a Datafile (Doc ID 739618.1)的更多相关文章
- 诊断:MRP0: Background Media Recovery terminated with error 1111
表现: 灾备环境,无法继续应用日志. 日志: MRP0: Background Media Recovery terminated with error 1111 Fri Jan 18 15:55:2 ...
- 诊断: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 ...
- Performing User-Managed Database-18.7、Performing Complete User-Managed Media Recovery
18.7.Performing Complete User-Managed Media Recovery 完毕一致性备份,把数据库恢复到当前的scn是最好的结果.能够恢复整个数据库.恢复单个表空间.或 ...
- ORA-01113: file xxxx needs media recovery
由于规范存储位置以及存储空间调整缘故需要移动表空间MRP_INDEX2的数据文件,如下所示,首先将表空间MRP_INDEX2脱机; 然后复制数据文件:接着重命名数据文件,最后将表空间MRP_INDEX ...
- 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 ...
- 关闭归档提示:ORA-38774: cannot disable media recovery - flashback database is enabled
SQL> select * from v$version; Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit P ...
- Basic Concepts of Block Media Recovery
Basic Concepts of Block Media Recovery Whenever block corruption has been automatically detected, yo ...
- 物理DG主备库切换时遇到ORA-16139: media recovery required错误
在物理DG主备库切换时遇到ORA-16139: media recovery required错误 SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRI ...
- 11G新特性 -- 块介质恢复性能增强(block media recovery)
块介质恢复性能增强(block media recovery) :只是恢复受损的块.不需要将受损的数据文件offline.针对受损的数据块,使用备份中好的数据块进行restore和recover,避免 ...
随机推荐
- python全栈开发day20-类的三大特性继承、多态、封装
1 继承 1.怎么继承,父类和子类 class 类名(父类):pass 除了__init__下对象属性不能自动继承外,其他的类属性和动态方法,子类对象都可以访问到. 2.子类对象查找属性的顺序,对象现 ...
- Scala入门教程---《chang哥教你一天搞定Scala》
<chang哥教你一天搞定Scala> /** * <chang哥教你一天搞定Scala> * scala是一门多范式编程语言,集成了面向对象编程和函数式编程等多种特性. * ...
- BZOJ3514 Codechef MARCH14 GERALD07加强版 LCT
欢迎访问~原文出处——博客园-zhouzhendong 去博客园看该题解 题目传送门 - BZOJ3514 题意概括 N个点M条边的无向图,询问保留图中编号在[l,r]的边的时候图中的联通块个数. N ...
- 001 LRU-缓存淘汰算法
1.介绍 LRU是LeastRecentlyUsed近期最少使用算法.内存管理的一种页面置换算法,对于在内存中但又不用的数据块(内存块)叫做LRU,Oracle会根据哪些数据属于LRU而将其移出内存而 ...
- LeetCode刷题笔记--Python--28. 实现strStr()
class Solution: def strStr(self, haystack, needle): """ :type haystack: str :type nee ...
- git根据用户过滤提交记录
使用SourceTree 使用gitk
- Java开发人员必须掌握的Linux命令(一)
子曰:"工欲善其事,必先利其器." 1.登录服务器SSH命令 简单说,SSH是一种网络协议,用于计算机之间的加密登录.如果一个用户从本地计算机,使用SSH协议登录另一台远程计算机, ...
- go语言学习-结构体
结构体 go语言中的结构体,是一种复合类型,有一组属性构成,这些属性被称为字段.结构体也是值类型,可以使用new来创建. 定义: type name struct { field1 type1 fie ...
- python魔法方法-属性访问控制
属性访问控制 所谓的属性访问控制就是控制点号访问属性的行为,而且不仅是类的外部,连类的内部也受控制,代码见真章,边看代码边解释: __getattr__(self, item) 定义当访问不存在的属性 ...
- Codeforces.567E.President and Roads(最短路 Dijkstra)
题目链接 \(Description\) 给定一张有向图,求哪些边一定在最短路上.对于不一定在最短路上的边,输出最少需要将其边权改变多少,才能使其一定在最短路上(边权必须为正,若仍不行输出NO). \ ...