重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4246|回复: 3
打印 上一主题 下一主题

[安装] dg备库恢复报ORA-19909: datafile 1 belongs to an orphan incarnation

[复制链接]
跳转到指定楼层
楼主
发表于 2016-10-10 21:38:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
用rman>duplicate target database for standby nofilenamecheck;在第一个备库上作第二个备库的创建后,第一个备库从新处于恢复模式,sql>recover managed standby database disconnect;后发现有错误,相对应的日志里如下的错误.同时也有一些与其它归档日志名不一样的东西,如下图:


alert_orcl.log中的日志如下;

Mon Oct 10 15:50:03 2016
Archived Log entry 237756 added for thread 2 sequence 124934 ID 0x4fd98d82 dest 1:
Mon Oct 10 17:10:57 2016
RFS[3]: Selected log 32 for thread 2 sequence 124936 dbid 1246535734 branch 811895258
Mon Oct 10 17:10:59 2016
Archived Log entry 237757 added for thread 2 sequence 124935 ID 0x4fd98d82 dest 1:
Mon Oct 10 17:43:18 2016
RFS[1]: Selected log 42 for thread 1 sequence 131172 dbid 1246535734 branch 811895258
Mon Oct 10 17:43:19 2016
Archived Log entry 237758 added for thread 1 sequence 131171 ID 0x4fd98d82 dest 1:
    Mon Oct 10 20:53:45 2016
    alter database recover managed standby database disconnect from session
Attempt to start background Managed Standby Recovery process (stdby)
Mon Oct 10 20:53:45 2016
MRP0 started with pid=52, OS id=11694
MRP0: Background Managed Standby Recovery process started (stdby)
started logmerger process
Mon Oct 10 20:53:50 2016
Managed Standby Recovery not using Real Time Apply
Warning: Recovery target destination is in a sibling branch
of the controlfile checkpoint. Recovery will only recover
changes to datafiles.
Datafile 1 (ckpscn 130259979458) is orphaned on incarnation#=3
MRP0: Detected orphaned datafiles!
Recovery will possibly be retried after flashback...
Errors in file /u01/app/oracle/diag/rdbms/stdby/stdby/trace/stdby_pr00_11696.trc:
ORA-19909: 数据文件 1 属于孤立的原型
ORA-01110: 数据文件 1: '+ORCLDATA/stdby/datafile/system.287.819682969'
Slave exiting with ORA-19909 exception
Errors in file /u01/app/oracle/diag/rdbms/stdby/stdby/trace/stdby_pr00_11696.trc:
ORA-19909: 数据文件 1 属于孤立的原型
ORA-01110: 数据文件 1: '+ORCLDATA/stdby/datafile/system.287.819682969'
Completed:     alter database recover managed standby database disconnect from session
Recovery Slave PR00 previously exited with exception 19909




同时查看系统相关进程如下,没有MRP0进程:

SQL> select seqnce#,process,status from v$managed_standby;

SEQNCE# PROCESS            STATUS
---------- ------------------ ------------------------
         0 ARCH               CONNECTED
         0 ARCH               CONNECTED
         0 RFS                IDLE
         0 RFS                IDLE



解决方法是:



[dbserver1::/home/oracle]$rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Mon Oct 10 20:55:28 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1246535734)
RMAN> list incarnation of database;
using target database control file instead of recovery catalog
List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       ORCL     1246535734       PARENT  1          2009-08-15 00:16:43
2       2       ORCL     1246535734       PARENT  945184     2010-05-11 22:10:02
3       3       ORCL     1246535734       PARENT  14600749921 2013-04-04 22:27:38
4       4       ORCL     1246535734       CURRENT 130257645313 2016-09-21 17:18:26



RMAN> reset database to incarnation 3;    (这里的3要与日志里的incarnation#=3要对应)

database reset to incarnation 3

RMAN>

然后

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 1.7180E+10 bytes
Fixed Size                  2050968 bytes
Variable Size            1677722728 bytes
Database B?rs         1.5485E+10 bytes
Redo B?rs               14725120 bytes
SQL> alter database mount standby database;

Database altered.

SQL> recover managed standby database disconnect;
Media recovery complete.
SQL>
此时再查看日志文件如下:

Attempt to start background Managed Standby Recovery process (stdby)
Mon Oct 10 21:05:19 2016
MRP0 started with pid=50, OS id=12763
MRP0: Background Managed Standby Recovery process started (stdby)
started logmerger process
Mon Oct 10 21:05:24 2016
Managed Standby Recovery not using Real Time Apply
Parallel Media Recovery started with 48 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Completed: alter database recover managed standby database disconnect from session
Media Recovery Log /oraback/archive/2_124762_811895258.dbf
Media Recovery Log /oraback/archive/1_131008_811895258.dbf
Media Recovery Log /oraback/archive/1_131009_811895258.dbf
Mon Oct 10 21:06:04 2016


同时查看相关系统进程

SQL> select seqnce#,process,status from v$managed_standby;

SEQUENCE# PROCESS   STATUS
---------- --------- ------------
         0 ARCH      CONNECTED
         0 ARCH      CONNECTED
         0 ARCH      CONNECTED
         0 ARCH      CONNECTED
         0 ARCH      CONNECTED
         0 ARCH      CONNECTED
         0 ARCH      CONNECTED
         0 ARCH      CONNECTED
         0 ARCH      CONNECTED
         0 ARCH      CONNECTED
         0 RFS       IDLE
SEQUENCE# PROCESS   STATUS
---------- --------- ------------
         0 RFS       IDLE
         0 RFS       IDLE
    124938 RFS       IDLE
         0 RFS       IDLE
    131174 RFS       IDLE
         0 RFS       IDLE
         0 RFS       IDLE
    131025 MRP0      APPLYING_LOG
19 rows selected.


SQL>

至此,问题解决。


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2016-10-10 21:39:19 | 只看该作者
此问题,差点要重建dg备库了。
回复 支持 反对

使用道具 举报

板凳
发表于 2016-10-10 21:42:18 | 只看该作者
什么情况呢
回复 支持 反对

使用道具 举报

地板
 楼主| 发表于 2016-10-10 23:35:44 | 只看该作者
参照 metalink note:ID 554358.1
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-5-18 17:58 , Processed in 0.083320 second(s), 19 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表