Oracle Active Data Guard调整案例

客户的Oracle 11gR2 Active Data Guard环境,主数据库的standby_file_management=AUTO,备用数据库的standby_file_management=MANUAL,导致在主数据库为表空间添加的数据文件操作没有同步到备用数据库,在$ORACLE_HOME/dbs目录下也没有创建类似UNNAMED00003的文件,备用数据库有如下的告警日志:
  Tue Sep 02 17:37:36 2014
  File #3 added to control file as 'UNNAMED00003' 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
  Errors in file /u01/app/oracle/diag/rdbms/d012dg/d012band/trace/d012band_pr00_5702078.trc:
  ORA-01274: cannot add datafile '/oradata1/d012band/tsmisc06.dbf' - file could not be created
  Managed Standby Recovery not using Real Time Apply
  Recovery interrupted!
  Recovered data files to a consistent state at change 866102511
  Tue Sep 02 17:37:46 2014
  MRP0: Background Media Recovery process shutdown (d012band)
  Tue Sep 02 17:52:14 2014
  RFS[1]: Selected log 8 for thread 1 sequence 19136 dbid 2134147111 branch 809469738
  Tue Sep 02 17:52:25 2014
  Archived Log entry 511 added for thread 1 sequence 19135 ID 0x7f340827 dest 1:
  Tue Sep 02 17:53:23 2014
  alter database recover managed standby database using current logfile disconnect from session
  Attempt to start background Managed Standby Recovery process (d012band)
  Tue Sep 02 17:53:23 2014
  MRP0 started with pid=42, OS id=7471452
  MRP0: Background Managed Standby Recovery process started (d012band)
  started logmerger process
  Tue Sep 02 17:53:29 2014
  Managed Standby Recovery starting Real Time Apply
  Tue Sep 02 17:53:30 2014
  Errors in file /u01/app/oracle/diag/rdbms/d012dg/d012band/trace/d012band_dbw0_4784178.trc:
  ORA-01186: file 3 failed verification tests
  ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
  ORA-01111: name for data file 3 is unknown - rename to correct file
  ORA-01110: data file 3: '/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00003'
  如果能够找到/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00003文件,可以参考文章:《11gR2 Active Data Guard调整案例[1]》http://blog.itpub.net/23135684/viewspace-759592/
  File 3 not verified due to error ORA-01157
  MRP0: Background Media Recovery terminated with error 1111
  Errors in file /u01/app/oracle/diag/rdbms/d012dg/d012band/trace/d012band_pr00_8716760.trc:
  ORA-01111: name for data file 3 is unknown - rename to correct file
  ORA-01110: data file 3: '/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00003'
  ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
  ORA-01111: name for data file 3 is unknown - rename to correct file
  ORA-01110: data file 3: '/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00003'
  Managed Standby Recovery not using Real Time Apply
  Slave exiting with ORA-1111 exception
  Errors in file /u01/app/oracle/diag/rdbms/d012dg/d012band/trace/d012band_pr00_8716760.trc:
  ORA-01111: name for data file 3 is unknown - rename to correct file
  ORA-01110: data file 3: '/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00003'
  ORA-01157: cannot identify/lock data file 3 - see DBWR trace file
  ORA-01111: name for data file 3 is unknown - rename to correct file
  ORA-01110: data file 3: '/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00003'
  Recovery Slave PR00 previously exited with exception 1111
  MRP0: Background Media Recovery process shutdown (d012band)
  Completed: alter database recover managed standby database using current logfile disconnect from session
 解决这个问题的关键是手动创建新添加的数据文件,参考如下的内容解决该问题:
  How to resolve MRP stuck issues on a physical standby database? (文档 ID 1221163.1)
  ......
  Solution 10 Add the new datafiles to the standby database manually.
  1) Please take a hot backup of new datafiles from the primary database.
  2) Create a new standby controlfile from the primary database by
  SQL>alter database create standby controlfile as '/tmp/controlf.ctl';
  If datafiles are on ASM, please follow the note below and you could ignore the rest of steps:
  Note 734862.1 Step By Step Guide On How To Recreate Standby Control File
  When Datafiles Are On ASM And Using Oracle Managed Files
  Or you could modify the wrong datafile name in the standby controlfile by alter database rename command. For example,
  SQL> ALTER DATABASE RENAME FILE '' to '';
  3) If the new datafile location on the primary is different from the standby, please make sure
  db_file_name_convert init parameter is set on the standby database.
  Note 47325.1 Init.ora Parameter "DB_FILE_NAME_CONVERT" Reference Note
  If db_file_name_convert init parameter has already been set, then you could ignore this step.
  4) Cancel the managed recovery
  SQL>alter database recover managed standby database cancel;
  5) set standby_file_management=manual on the standby database and shutdown the standby database.
  SQL>alter system set standby_file_management=manual sid='*';
  SQL>shutdown immediate;
  6) Copy the hot backup of the new datafiles and the new standby controlfile to the standby.
  Please make sure the controlfiles are located in the right location with right names
  according to the init parameter control_files. Please make sure the copied datafiles are
  located in the right location as well according to name from v$datafile.
  7) startup the standby database in mount mode and set standby_file_management=auto.
  SQL>startup mount;
  SQL>alter system set standby_file_management=auto sid='*';
  8) Start the managed recovery.
  SQL>alter database recover managed standby database disconnect;
  ......
  --end--

最新内容请见作者的GitHub页:http://qaseven.github.io/

时间: 2024-09-13 05:26:50

Oracle Active Data Guard调整案例的相关文章

【12.2新特性】在Oracle Active Data Guard上部署列式存储

一.In-Memory and Active Data Guard 在Active Data Guard上部署列式存储的目的 可以选在在主库.备库或者两者同时部署列式存储.当在主备库上同时部署了列式存储的时候,可以在两个库上对相同或者不同的对象集做操作,如果是操作不同的对象集,那就相当于增加了In-Memory的存储大小. 在主备库上部署同样的In-Memory. 在最简单的情况下,主数据库和备用数据库都包含具有相同大小(不是必需的)的IM列存储. IM列存储包含相同的对象. 此方案的优点是分析

【DataGuard】11g 新特性:Active Data Guard

  在Oracle 11g之前,物理备库(physical Standby)在应用redo的时候,是不可以打开的,只可以mount.从11g开始,在应用redo的时候,物理备库可以处于read-only模式,这就称为Active Data Guard .通过Active Data Guard,可以在物理备库进行查询或者导出数据,从而减少对主库的访问和压力. Active Data Guard适用于一些只读性的应用,比如,有的应用程序只是查询数据,进行一些报表业务,不会产生redo数据,这些应用可

Oracle 12C Active Data Guard Far Sync 配置

Active Data Guard Far Sync是Oracle 12c的新功能(也称为Far Sync Standby),Far Sync功能的实现是通过在距离主库(Primary Database)相对较近的地点配置Far Sync实例,主库(Primary Database) 同步(synchronous)传输redo到Far Sync实例,然后Far Sync实例再将redo异步(asynchronous)传输到终端备库(Standby Database).这样既可以保证零数据丢失又可

Oracle 11g Data Guard环境中的归档管理

11g里面,随着ASM.RAC.Data Guard(包括Active Data Guard)的成熟,使用RAC+ASM+Data Guard越来越成为一种可靠的.维护简单.稳定的高可用性和容灾保护方案.这篇文章谈谈如何管理Oracle 11g Data Guard环境中的归档日志. 归档日志是重要的,不然就不必提到这篇文章,备份恢复需要它,而Data Guard也需要它.在早期版本的Data Guard环境中,常常面临着归档日志管理问题.在Data Guard环境里面,对归档日志管理需要达到以

基于同一主机配置Oracle 11g Data Guard(logical standby)

      Oracle Data Guard逻辑备库是利用主库的一个备份首先建立一个物理备库,然后再将其转换为逻辑备库.这之后主库将日志传递到备库,备库利用logminer从主库的日志中解析出主库所执行过的SQL,在备库上重新执行一遍,从而保证与主库的数据在逻辑上保持一致.与物理备库相对应的是,物理备库使用的是redo apply,逻辑备库使用的是sql apply.因此逻辑备库仅仅保证数据与主库是在逻辑上是一致的,从而逻辑备库可以处于open状态下并进行相应的DML操作.本文描述了创建逻辑备

[20160222]Oracle 11G Data Guard Failover

[20160222]Oracle 11G Data Guard Failover-flush redo.txt --链接: http://blog.csdn.net/tianlesoftware/article/details/6256542 在Oracle 11g里,Data Guard 切换多了一个新的功能:flush redo. Flush 能把没有发送的redo 从主库传送到standby库. 只要主库能启动到mount 状态,那么Flush 就可以把没有发送的归档和current on

Active Data Guard初探(一)

    对于Active Data Guard,我是这样想的,可能会有很多不对的地方,互相讨论,一起补充吧.     如果有一天我成了Oracle的产品架构师,时光倒退10年,那个时候还是9i,10g的年代,现在摆在我面前的一个艰巨的任务那就是Data Guard的可用性,易用性的问题,刚刚从xx部门得到了一份数据,可以看到目前的Data Guard尽管提供了Physical Standby和Logical Standby,但是显然客户对于的Physical的接受程度要远高于Logical,毕竟

Oracle 12c Data Guard搭建(一)

    对于使用12c的PDB,如果想尽快熟悉,掌握,那就是和业务挂钩,让它跑在业务上.当然是在能够基本驾驭它的前提下,要不就真成了甩手掌柜.11g可以玩得很好,12c里面也差不到哪里去.     摆在我面前的一个选择就是字符集,尽管有大量的PDB需要整合进来,但是我在分析了几套需要整合的数据库之后,发现字符集还是一个很重要的考量.比如几个已有的旧版本的数据库字符集为 UTF-8 US7ASCII   ZHS16GBK  ZHS16GBK,折中一些,根据实际情况还是选用ZHS16GBK,如果是个

如何在同一台服务器上建立Oracle 10g DATA GUARD

为了测试在同一台服务器上建立了DATA GUARD环境. 主库状态正常,也存在可用的备份,下面设置主库的FORCE LOGGING和相关的初始化参数: SQL> alter database force logging; Database altered. 修改主库的初始化参数: SQL> alter system set log_archive_config = 'DG_CONFIG=(primary,standby)'; System altered. SQL> alter syst