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,避免 ...
随机推荐
- xftp和xshell有什么区别
XshellXshell是一个用于MS Windows平台的强大的SSH,TELNET,和RLOGIN终端仿真软件.它使得用户能轻松和安全地从Windows PC上访问Unix/Linux主机.Xft ...
- #2 codeforces 480 Parcels
题意: 就是有一个用来堆放货物的板,承重力为S.现在有N件货物,每件货物有到达的时间,运走的时间,以及重量,承重,存放盈利.如果这件货物能再运达时间存放,并在指定时间取走的话,就能获得相应的盈利值.货 ...
- Yii1版本下控制台应用的使用
1.前言 很多时候,需要执行脚本任务,这时候,大多数我是不希望打开一个浏览器,输入地址来跑脚本的,这样我感觉很不爽,这时候,Yii1版本也是自带控制台下执行脚本的,具体实现步骤如下: 2.comman ...
- 《Android进阶之光》--多线程编程
No1: 实现多线程的3中方法 1)继承Thread,重写run()方法 2)实现Runnable接口,并实现该接口的run()方法 3)实现Callable接口,重写call()方法 public ...
- Vscode下Python的用户界面介绍
Visual Studio Code的核心是代码编辑器.与许多其他代码编辑器一样,VS Code在左侧采用通用用户界面和浏览器布局,显示您可以访问的所有文件和文件夹,右侧显示编辑器,显示已打开文件的内 ...
- cache 基本原理
Cache 主要由 Cache Tag,Cache 存储体,Cache 控制模块组成.Cache Tag 主要用来记录 Cache 存储体中数据的位置和判断 Cache 内数据是否命中: Ca ...
- android studio git 将项目分享到github,推送到其他平台 码云 等。
android studio git 将项目分享到github,推送到其他平台 码云 等. 作者:韩梦飞沙 Author:han_meng_fei_sha 邮箱:313134555@qq.com E- ...
- android monitor 汉化
作者:韩梦飞沙 Author:han_meng_fei_sha 邮箱:313134555@qq.com E-mail: 313134555 @qq.com === == ============= = ...
- loj#2552. 「CTSC2018」假面
题目链接 loj#2552. 「CTSC2018」假面 题解 本题严谨的证明了我菜的本质 对于砍人的操作好做找龙哥就好了,blood很少,每次暴力维护一下 对于操作1 设\(a_i\)为第i个人存活的 ...
- UVA.12230.Crossing Rivers(期望)
题目链接 /* 到达一条河时,船在河中的位置是随机的,所以船到达岸边需要的时间在 0~2l/v 均匀分布,所以船到岸的期望为 (0+2l/v)/2 过河需要 l/v 的时间,所以过一条河总的期望为 ( ...