蓝色风铃

追逐梦想永不放弃!

导航

ORA-19909: datafile 1 belongs to an orphan incarnation

白象:我刚用rman>duplicate target database for standby nofilenamecheck;恢复完成,同时recover managed standby database disconnect;来做归档同步.刚开始还好好的,约一个小时后归档日传递且所有归档都传递后.我将数据停止然后再启动一次sql>startup nomount; sql>alter database mount standby database; sql>recover managed standby database disconnect;后发现有错误,相对应的日志里如下的错误.同时也有一些与其它归档日志名不一样的东西,如下图:

ORA-19909: datafile 1 belongs to an orphan incarnation - cuuzhang - cuuzhang的博客

 

alert_orcl.log中的日志如下;

ALTER DATABASE RECOVER  managed standby database disconnect  
Wed Jun  8 09:26:00 2011
Attempt to start background Managed Standby Recovery process (orcl)
MRP0 started with pid=21, OS id=17669
Wed Jun  8 09:26:01 2011
MRP0: Background Managed Standby Recovery process started (orcl)
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 88522689858) is orphaned on incarnation#=8
MRP0: Background Media Recovery terminated with error 19909
Wed Jun  8 09:26:06 2011
Errors in file /home/oracle/admin/orcl/bdump/orcl_mrp0_17669.trc:
ORA-19909: datafile 1 belongs to an orphan incarnation
ORA-01110: data file 1: '/home/oracle/OraHome1/oradata/system01.dbf'
Wed Jun  8 09:26:06 2011
Errors in file /home/oracle/admin/orcl/bdump/orcl_mrp0_17669.trc:
ORA-19909: datafile 1 belongs to an orphan incarnation
ORA-01110: data file 1: '/home/oracle/OraHome1/oradata/system01.dbf'
Wed Jun  8 09:26:06 2011
MRP0: Background Media Recovery process shutdown (orcl)
Wed Jun  8 09:26:07 2011
Completed: ALTER DATABASE RECOVER  managed standby database disconnect  
Wed Jun  8 09:29:51 2011
Using STANDBY_ARCHIVE_DEST parameter default val as /oradata/archivelog
Redo Shipping Client Connected as P LIC
-- Connected User is Valid
RFS[1]: Assigned to RFS process 17696
RFS[1]: Identified database type as 'physical standby'
Wed Jun  8 09:29:51 2011
RFS LogMiner: Client disabled from further notification
Wed Jun  8 09:29:51 2011
Redo Shipping Client Connected as P LIC
-- Connected User is Valid
RFS[2]: Assigned to RFS process 17698
RFS[2]: Identified database type as 'physical standby'
Wed Jun  8 09:30:53 2011
RFS[1]: Physical Standby in the future of Branch(resetlogs_id) 723260712
RFS[1]: Standby database SCN: 20:-1671623358  Primary branch SCN: 3:235232652
RFS[1]: New Archival REDO Branch(resetlogs_id): 723260712  Prior: 751557430
RFS[1]: Archival Activation ID: 0x4b50df8b Current: 0x4b50df8b
RFS[1]: Effect of primary database OPEN RESETLOGS
RFS[1]: No standby redo logfiles created
Wed Jun  8 09:31:10 2011
RFS[1]: Archived Log: '/oradata/archivelog/1_12395_723260712.dbf'

同时查看系统相关进程如下,没有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

解决方法是:

[oracle@db ~]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Prod tion on \?\?\?\?\?\? 6\?\? 8 09:31:58 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: ORCL (DBID=1129995432, not open)

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     1129995432       PARENT  1          22-10\?\?-05
2       2       ORCL     1129995432       PARENT  525876     27-9\?\? -06
3       3       ORCL     1129995432       PARENT  13120006157 01-7\?\? -10
4       4       ORCL     1129995432       PARENT  13120007859 01-7\?\? -10
5       5       ORCL     1129995432       PARENT  13120010170 02-7\?\? -10
6       6       ORCL     1129995432       PARENT  13120130174 02-7\?\? -10
7       7       ORCL     1129995432       PARENT  13120133585 02-7\?\? -10
8       8       ORCL     1129995432       PARENT  13120134540 02-7\?\? -10
9       9       ORCL     1129995432       ORPHAN  75465258282 10-5\?\? -11
10      10      ORCL     1129995432       CURRENT 80264845201 19-5\?\? -11

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

database reset to incarnation 8

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> 
此时再查看日志文件如下:

ALTER DATABASE RECOVER  managed standby database disconnect  
Wed Jun  8 09:47:58 2011
Attempt to start background Managed Standby Recovery process (orcl)
MRP0 started with pid=21, OS id=17871
Wed Jun  8 09:47:58 2011
MRP0: Background Managed Standby Recovery process started (orcl)
Managed Standby Recovery not using Real Time Apply
Media Recovery Log /oradata/archivelog/1_12378_723260712.dbf
Wed Jun  8 09:48:04 2011
Completed: ALTER DATABASE RECOVER  managed standby database disconnect  
Wed Jun  8 09:50:40 2011
Media Recovery Log /oradata/archivelog/1_12379_723260712.dbf
Wed Jun  8 09:51:51 2011
Using STANDBY_ARCHIVE_DEST parameter default val as /oradata/archivelog
Redo Shipping Client Connected as P LIC
-- Connected User is Valid
RFS[1]: Assigned to RFS process 17889
RFS[1]: Identified database type as 'physical standby'
Wed Jun  8 09:51:51 2011
RFS LogMiner: Client disabled from further notification
Wed Jun  8 09:51:54 2011
Redo Shipping Client Connected as P LIC
-- Connected User is Valid
RFS[2]: Assigned to RFS process 17892
RFS[2]: Identified database type as 'physical standby'
Wed Jun  8 09:52:39 2011
Media Recovery Log /oradata/archivelog/1_12380_723260712.dbf
Wed Jun  8 09:52:42 2011
RFS[1]: Physical Standby in the future of Branch(resetlogs_id) 750782075
RFS[1]: Standby database SCN: 20:-1650114384  Primary branch SCN: 17:-1844153046
RFS[1]: New Archival REDO Branch(resetlogs_id): 750782075  Prior: 723260712
RFS[1]: Archival Activation ID: 0x4c35b97a Current: 0x4b50df8b
RFS[1]: Effect of primary database OPEN RESETLOGS
RFS[1]: Managed Standby Recovery process is active
RFS[1]: No standby redo logfiles created
Wed Jun  8 09:52:56 2011
RFS[1]: Archived Log: '/oradata/archivelog/1_131_750782075.dbf'
Wed Jun  8 09:54:36 2011
Media Recovery Log /oradata/archivelog/1_12381_723260712.dbf
Wed Jun  8 09:56:38 2011
Media Recovery Log /oradata/archivelog/1_12382_723260712.dbf
Wed Jun  8 09:57:40 2011
RFS[1]: No standby redo logfiles created
Wed Jun  8 09:57:58 2011
RFS[1]: Archived Log: '/oradata/archivelog/1_132_750782075.dbf'
Wed Jun  8 09:58:34 2011
Media Recovery Log /oradata/archivelog/1_12383_723260712.dbf

同时查看相关系统进程

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

 SEQNCE# PROCESS            STATUS
---------- ------------------ ------------------------
         0 ARCH               CONNECTED
         0 ARCH               CONNECTED
     12385 MRP0               APPLYING_LOG
         0 RFS                IDLE
         0 RFS                IDLE

SQL> 

posted on 2015-01-06 21:43  蓝色风铃  阅读(2301)  评论(1编辑  收藏  举报