ITPub博客

首页 > 数据库 > Oracle > RAC----> 单机DG问题

RAC----> 单机DG问题

原创 Oracle 作者:流浪的野狼 时间:2017-08-15 18:08:14 1 删除 编辑
环境信息:主环境为RAC 11.2.0.4
               DG环境为:单机

由于主环境参数:standby_file_management=auto,从库忘记设置该参数为auto,使用了默认值manual,导致在主库添加表空间后从库的数据文件出现异常:
主库:create tablespace history;
从库开始报错如下:
Media Recovery Log /OraArch/fast_recovery_area/edbdb/1_3459_919116436.dbf
Media Recovery Log /OraArch/fast_recovery_area/edbdb/2_3633_919116436.dbf
File #102 added to control file as 'UNNAMED00102' because
the parameter STANDBY_FILE_MANAGEMENT is set to MANUAL
The file should be manually created to continue.
Errors with log /OraArch/fast_recovery_area/edbdb/2_3633_919116436.dbf
MRP0: Background Media Recovery terminated with error 1274
Errors in file /oracle/app/db/diag/rdbms/edbdbdg/edbdb/trace/edbdb_pr00_6266.trc:
ORA-01274: cannot add datafile '+DATA01/edbdb/datafile/history.380.952097033' - file could not be created
Tue Aug 15 15:57:36 2017
Recovery interrupted!
Recovered data files to a consistent state at change 8959280954
Tue Aug 15 15:57:37 2017
MRP0: Background Media Recovery process shutdown (edbdb)
Tue Aug 15 16:34:15 2017
Archived Log entry 1331 added for thread 2 sequence 3634 rlc 919116436 ID 0x637e066f dest 2:
RFS[5]: No standby redo logfiles created
RFS[5]: Opened log for thread 2 sequence 3635 dbid 1600588005 branch 919116436
Tue Aug 15 16:41:40 2017
Archived Log entry 1332 added for thread 1 sequence 3460 rlc 919116436 ID 0x637e066f dest 2:
RFS[2]: No standby redo logfiles created
RFS[2]: Opened log for thread 1 sequence 3461 dbid 1600588005 branch 919116436
Tue Aug 15 16:50:13 2017
Archived Log entry 1333 added for thread 2 sequence 3635 rlc 919116436 ID 0x637e066f dest 2:
RFS[5]: No standby redo logfiles created
RFS[5]: Opened log for thread 2 sequence 3636 dbid 1600588005 branch 919116436
Tue Aug 15 17:06:49 2017
RFS[2]: No standby redo logfiles created
RFS[2]: Opened log for thread 1 sequence 3461 dbid 1600588005 branch 919116436
Tue Aug 15 16:50:13 2017
Archived Log entry 1333 added for thread 2 sequence 3635 rlc 919116436 ID 0x637e066f dest 2:
RFS[5]: No standby redo logfiles created
RFS[5]: Opened log for thread 2 sequence 3636 dbid 1600588005 branch 919116436
Tue Aug 15 17:06:49 2017
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
Attempt to start background Managed Standby Recovery process (edbdb)
Tue Aug 15 17:06:49 2017
MRP0 started with pid=30, OS id=14103
MRP0: Background Managed Standby Recovery process started (edbdb)
 started logmerger process
Tue Aug 15 17:06:54 2017
Managed Standby Recovery not using Real Time Apply
Tue Aug 15 17:06:54 2017
Errors in file /oracle/app/db/diag/rdbms/edbdbdg/edbdb/trace/edbdb_dbw0_6091.trc:
ORA-01186: file 102 failed verification tests
ORA-01157: cannot identify/lock data file 102 - see DBWR trace file
ORA-01111: name for data file 102 is unknown - rename to correct file
ORA-01110: data file 102: '/oracle/app/11.2.0/db_1/dbs/UNNAMED00102'
File 102 not verified due to error ORA-01157
MRP0: Background Media Recovery terminated with error 1111
Errors in file /oracle/app/db/diag/rdbms/edbdbdg/edbdb/trace/edbdb_pr00_14109.trc:
ORA-01111: name for data file 102 is unknown - rename to correct file
ORA-01110: data file 102: '/oracle/app/11.2.0/db_1/dbs/UNNAMED00102'
ORA-01157: cannot identify/lock data file 102 - see DBWR trace file
ORA-01111: name for data file 102 is unknown - rename to correct file
ORA-01110: data file 102: '/oracle/app/11.2.0/db_1/dbs/UNNAMED00102'
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION

解决方案:
因从库个人配置时采用了omf管理方式,故此可以如下处理:
alter database create datafile '/oracle/app/11.2.0/db_1/dbs/UNNAMED00102' as new;
创建完成后记得一定把参数修改回来,否则后期仍然会出类似错误:
alter system set standby_file_management='AUTO';
然后打开从库:
alter database open;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE disconnect from session;
此时可以看到从库的alert日志中已经提示恢复正常:
Tue Aug 15 17:52:21 2017
alter database create datafile '/oracle/app/11.2.0/db_1/dbs/UNNAMED00102' as new
Tue Aug 15 17:52:44 2017
Completed: alter database create datafile '/oracle/app/11.2.0/db_1/dbs/UNNAMED00102' as new
Tue Aug 15 17:53:17 2017
ALTER SYSTEM SET standby_file_management='AUTO' SCOPE=BOTH;
alter database open
Signalling error 1152 for datafile 102!
Beginning Standby Crash Recovery.
Serial Media Recovery started
Managed Standby Recovery starting Real Time Apply
Media Recovery Log /OraArch/fast_recovery_area/edbdb/1_3459_919116436.dbf
Media Recovery Log /OraArch/fast_recovery_area/edbdb/2_3633_919116436.dbf
Incomplete Recovery applied until change 8959280954 time 08/15/2017 15:24:24
Completed Standby Crash Recovery.
Tue Aug 15 17:53:25 2017
SMON: enabling cache recovery
Dictionary check beginning
File #102 in the controlfile not found in data dictionary.
Removing file from controlfile.
data file 102: '/OraData/EDBDBDG/datafile/o1_mf_history_ds5k2o6m_.dbf'
Tablespace 'HISTORY' #24 found in controlfile,
but not in the data dictionary. Deleting from controlfile.
Dictionary check complete
Database Characterset is AL32UTF8
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Physical standby database opened for read only access.
Completed: alter database open
Tue Aug 15 17:53:40 2017
alter database recover managed standby database disconnect from session
Attempt to start background Managed Standby Recovery process (edbdb)
Tue Aug 15 17:53:40 2017
MRP0 started with pid=27, OS id=17932 
MRP0: Background Managed Standby Recovery process started (edbdb)
 started logmerger process
Tue Aug 15 17:53:45 2017
Managed Standby Recovery not using Real Time Apply
Parallel Media Recovery started with 8 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Log /OraArch/fast_recovery_area/edbdb/1_3459_919116436.dbf
Media Recovery Log /OraArch/fast_recovery_area/edbdb/2_3633_919116436.dbf
Completed: alter database recover managed standby database disconnect from session
Tue Aug 15 17:54:08 2017
Successfully added datafile 102 to media recovery
Datafile #102: '/OraData/EDBDBDG/datafile/o1_mf_history_ds5k59qk_.dbf'
Tue Aug 15 17:54:23 2017
Media Recovery Log /OraArch/fast_recovery_area/edbdb/2_3634_919116436.dbf
Media Recovery Log /OraArch/fast_recovery_area/edbdb/1_3460_919116436.dbf
Tue Aug 15 17:54:52 2017

其他情况的操作可参考:Doc ID 739618.1


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28612416/viewspace-2143595/,如需转载,请注明出处,否则将追究法律责任。

上一篇: Oracle12.1闪回功能
请登录后发表评论 登录
全部评论

注册时间:2013-04-10

  • 博文量
    151
  • 访问量
    1509960