主库添加数据文件后,备库因为创建文件失败而停止数据同步

primary环境:11gR2 RAC+ASM
standby环境:本地单机

主库添加数据文件后,备库因为创建文件失败而停止数据同步。

1.查看主库环境的数据文件

SQL> select file#,status,name from v$datafile;

     FILE# STATUS  NAME
---------- ------- --------------------------------------------
         1 SYSTEM  +ABCE/test/datafile/system.293.930567941
         2 ONLINE  +ABCE/test/datafile/sysaux.294.930567941
         3 ONLINE  +ABCE/test/datafile/undotbs1.323.937148625
         4 ONLINE  +ABCE/test/datafile/users.296.930567941
         5 ONLINE  +ABCE/test/datafile/undotbs2.324.937148779
         6 ONLINE  +ABCE/test/datafile/dtest.306.930571875
         7 ONLINE  +ABCE/test/datafile/dtest.328.950783567
         8 ONLINE  +ABCE/test/datafile/dtest.295.981369995
         9 ONLINE  +ABCE/test/datafile/dtest.325.931996247
        10 ONLINE  +ABCE/test/datafile/dtest.326.931996261
        11 ONLINE  +ABCE/test/datafile/dtest.327.931996267

 

2.查看备库的数据文件

SQL> select file#,status,name from v$datafile;

     FILE# STATUS  NAME
---------- ------- ------------------------------------------------------------------
         1 SYSTEM  /t01/app/oracle/oradata/teststby/datafile/system.293.930567941
         2 ONLINE  /t01/app/oracle/oradata/teststby/datafile/sysaux.294.930567941
         3 ONLINE  /t01/app/oracle/oradata/teststby/datafile/undotbs1.323.937148625
         4 ONLINE  /t01/app/oracle/oradata/teststby/datafile/users.296.930567941
         5 ONLINE  /t01/app/oracle/oradata/teststby/datafile/undotbs2.324.937148779
         6 ONLINE  /t01/app/oracle/oradata/teststby/datafile/dtest.306.930571875
         7 ONLINE  /t01/app/oracle/oradata/teststby/datafile/dtest.328.950783567
         8 RECOVER /t01/app/oracle/testuct/11.2.0/dbhome_1/dbs/UNNAMED00008
         9 ONLINE  /t01/app/oracle/oradata/teststby/datafile/dtest.325.931996247
        10 ONLINE  /t01/app/oracle/oradata/teststby/datafile/dtest.326.931996261
        11 ONLINE  /t01/app/oracle/oradata/teststby/datafile/dtest.327.931996267

  

3.查看备库的alert日志

Fri Jul 13 10:49:06 2018
Archived Log entry 10155 added for thread 2 sequence 5489 ID 0x1468c5ce dest 1:
RFS[8]: Selected log 11 for thread 2 sequence 5490 dbid 342406353 branch 930568019
Archived Log entry 10156 added for thread 2 sequence 5490 ID 0x1468c5ce dest 1:
RFS[8]: Selected log 11 for thread 2 sequence 5491 dbid 342406353 branch 930568019
Errors in file /t01/app/oracle/diag/rdbms/teststby/teststby/trace/teststby_pr00_3183.trc:
ORA-01119: error in creating database file ‘+ABCE‘
ORA-17502: ksfdcre:4 Failed to create file +ABCE
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 Synchronization Service
File #8 added to control file as ‘UNNAMED00008‘.
Originally created as:
‘+ABCE/test/datafile/dtest.295.981369995‘
Recovery was unable to create the file as a new OMF file.
Errors with log /t01/app/oracle/arch/2_5487_930568019.dbf
MRP0: Background Media Recovery terminated with error 1274
Errors in file /t01/app/oracle/diag/rdbms/teststby/teststby/trace/teststby_pr00_3183.trc:
ORA-01274: cannot add datafile ‘+ABCE/test/datafile/dtest.295.981369995‘ - file could not be created
Archived Log entry 10157 added for thread 1 sequence 7113 ID 0x1468c5ce dest 1:
Fri Jul 13 10:49:11 2018
RFS[7]: Selected log 9 for thread 1 sequence 7114 dbid 342406353 branch 930568019
Fri Jul 13 10:50:16 2018
Recovery interrupted!
Recovered data files to a consistent state at change 1162173286
Fri Jul 13 10:50:16 2018
MRP0: Background Media Recovery process shutdown (teststby)

  

修复方案

在备库执行以下操作

SQL> show parameter STANDBY_FILE_MANAGEMENT

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
standby_file_management              string      AUTO
SQL> show parameter db_file_name_convert 

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string      +ABCE/test/DATAFILE/, /t01/app/oracle/oradata/teststby/datafile/,
						 +ABCE/test/TEMPFILE/, /t01/app/oracle/oradata/teststby/tempfile/
SQL> alter system set standby_file_management=manual;

System altered.

SQL> alter database create datafile ‘/t01/app/oracle/testuct/11.2.0/dbhome_1/dbs/UNNAMED00008‘ as ‘/t01/app/oracle/oradata/teststby/datafile/dtest.295.981369995‘;

Database altered.

SQL> alter system set standby_file_management=auto;

  

然后重启MRP

SQL> alter database recover managed standby database cancel;
alter database recover managed standby database cancel
*
ERROR at line 1:
ORA-16136: Managed Standby Recovery not active

SQL> alter database recover managed standby database disconnect from session;

  

可以再次查看alert日志

Fri Jul 13 11:19:53 2018
alter database recover managed standby database cancel
ORA-16136 signalled during: alter database recover managed standby database cancel...
Fri Jul 13 11:21:06 2018
alter database recover managed standby database disconnect from session
Attempt to start background Managed Standby Recovery process (teststby)
Fri Jul 13 11:21:07 2018
MRP0 started with pid=26, OS id=10385
MRP0: Background Managed Standby Recovery process started (teststby)
 started logmerger process
Fri Jul 13 11:21:12 2018
Managed Standby Recovery not using Real Time Apply
Parallel Media Recovery started with 4 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Log /t01/app/oracle/arch/2_5487_930568019.dbf
Media Recovery Log /t01/app/oracle/arch/1_7110_930568019.dbf
Completed: alter database recover managed standby database disconnect from session
Media Recovery Log /t01/app/oracle/arch/1_7111_930568019.dbf
Media Recovery Log /t01/app/oracle/arch/2_5488_930568019.dbf
Media Recovery Waiting for thread 2 sequence 5491 (in transit)

  

 

原文地址:https://www.cnblogs.com/abclife/p/9304112.html

时间: 2024-10-06 11:12:58

主库添加数据文件后,备库因为创建文件失败而停止数据同步的相关文章

dataguard主库删除归档日志后从库恢复的方法

------------------方法1在主库上使用备份的进行恢复丢失的归档日志-------------------------1.发现主库备份后删除了归档,但是这些归档从库还没应用,也没有传到从库从库应用的最新的归档日志为592SQL> connect / as sysdbaConnected.SQL> Select Max(t.SEQUENCE#) From V$archived_Log t; MAX(T.SEQUENCE#)---------------- 592 主库的归档日志SQ

python判断文件和文件夹是否存在、创建文件夹

>>> import os >>> os.path.exists('d:/assist') True >>> os.path.exists('d:/assist/getTeacherList.py') True >>> os.path.isfile('d:/assist') False >>> os.path.isfile('d:/assist/getTeacherList.py') True >>>

Java 判断文件夹、文件是否存在、否则创建文件夹

1.判断文件是否存在,不存在创建文件 File file=new File("C:\\Users\\QPING\\Desktop\\JavaScript\\2.htm"); if(!file.exists()) { try { file.createNewFile(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } 2.判断文件夹是否存在,不存在创建文件夹 Fi

C# 判断文件夹存在与否并创建文件夹

protected void Button1_Click(object sender, EventArgs e) { if (Directory.Exists(Server.MapPath("~/upimg/hufu")) == false)//如果不存在就创建file文件夹 { Directory.CreateDirectory(Server.MapPath("~/upimg/hufu")); } //Directory.Delete(Server.MapPath

WIN10桌面无创建文件夹选项,无法创建文件

在桌面或其他磁盘,右键没有新建选项,无法新建文件夹或文档.   右键桌面左下角开始按钮,点击:命令提示符(管理员)   弹出,Windows命令处理程序对话框,点击是   粘贴内容: cmd /k reg add "HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\New" /ve /t REG_SZ /d {D969A300-E7FF-11d0-A93B-00A0C90F2719} /f   点击键盘

C语言 HTTP上传文件-利用libcurl库上传文件

原文  http://justwinit.cn/post/7626/ 通常情况下,一般很少使用C语言来直接上传文件,但是遇到使用C语言编程实现文件上传时,该怎么做呢? 借助开源的libcurl库,我们可以容易地实现这个功能.Libcurl是一个免费易用的客户端URL传输库,主要功能是用不同的协议连接和沟通不同的服务器,libcurl当前支持DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP,IMAPS, LDAP, LDAPS, POP3, POP3

继之前SCVMM WinRM问题后重新添加群集后Windows Azure Pack创建虚拟机失败

租户选择虚拟机模板创建虚拟机运行一会就报错: 我重新注册了VM云以及自动化都成功,但问题依旧,提示说数据库连接问题,因此我怀疑之前在排错SCVMM WinRM问题时卸载了SCVMM CU5,因此怀疑CU5是对数据库是有更新的,所以导致的,故把SCVMM再次升级到CU5,此问题解决了,同时CU5是更新了MP包的,因此在用SCVMM和SCOM集成的监控时,记得导入最新的SCVMM MP包进SCOM: 导入完成后在SCVMM上刷新下即可

C# Web 下载excel文件后直接导入下载的文件报错的问题

下载代码如下: System.Web.HttpContext.Current.Response.Clear(); System.Web.HttpContext.Current.Response.ClearHeaders(); System.Web.HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");System.Web.HttpContext.Current.R

上传文件到服务器上先创建文件夹

using System.IO; string directory = "UploadPhotos/"; //在服务器上创建上传图片存储的文件夹 if (!Directory.Exists(Server.MapPath(directory))) //判断存储图片的文件夹是否存在 { Directory.CreateDirectory(Server.MapPath(directory)); //如果不存在,创建它 }