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
最新文章
- 161206、 Ionic、Angularjs、Cordova搭建Android开发环境
- Android开发:碎片Fragment完全解析fragment_main.xml/activity_main.xml(转)
- UVA - 1614 Hell on the Market(贪心)
- Linux基础知识之 系统启动流程
- Tomcat 笔记-目录简介
- Matlab to OpenCV Mat
- #2019-2020-4 实验二面向对象程序设计《Java开发环境的熟悉》实验报告
- C# 23种设计模式汇总
- codeforces545C
- Java实现小学四则运算练习系统(UI)
- Linux升级内核教程(CentOS7)
- 直面Java 第004期。
- ASP.NET 日志组件Smart.LogNet.DLL 引用即可写入日志及读取日志
- 性能计数器监控typeperf
- 浅谈浅克隆(shallow clone)和 深克隆(deep clone)
- bzoj 4161: Shlw loves matrixI
- 20145219 《Java程序设计》第10周学习总结
- C#文件与文件夹操作
- 前端技巧-w3c
- C语言进阶——goto 和 void 的分析08
热门文章
- python全栈开发day49-jquery的位置信息、事件流、事件对象,事件委托,事件绑定和解绑
- 基于pgrouting的最短路径规划
- K8s创建pod yaml文件详解
- Fibonacci PKU logn 求斐波那契的快速方法!!!
- 【Java】 剑指offer(37) 序列化二叉树
- Trident简介
- 洛谷 P1135 奇怪的电梯 【基础BFS】
- Android 7.0 PopupWindow 又引入新的问题,Google工程师也不够仔细么
- 【原创】ABP之IConventionalDependencyRegistra接口分析
- [POI2011]Rotacje na drzewie (2)/[BZOJ3702]二叉树