ORA-19909: datafile 1 belongs to an orphan incarnation 一例
2015-04-23 09:22
465 查看
ORA-19909: datafile 1 belongs to an orphan incarnation
SQL> startup mount;
ORACLE instance started.
Total System Global Area 6847938560 bytes
Fixed Size 2219808 bytes
Variable Size 3539992800 bytes
Database Buffers 3288334336 bytes
Redo Buffers 17391616 bytes
Database mounted.
SQL> recover database using backup controlfile;
ORA-00283: recovery session canceled due to errors
ORA-19909: datafile 1 belongs to an orphan incarnation
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
Cause & Background information
The standby database has been activated previously but since then reverted back into its standby role. Prior to the RMAN duplicate operation the "alter system reset control_files scope=spfile sid='*';" has not been executed (i.e. the control files have not been overwritten).
Analysis
Primary and standby have different incarnations:
在我的实验中,实验数据库是利用RMAN duplicate 生成的,猜想可能是这个原因造成的。
$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 13 15:33:18 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1276064171, not open)
RMAN> list incarnation of database;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
2 2 ORCL 1276064171 CURRENT 979911 12-APR-11
1 1 ORCL 1276064171 ORPHAN 1094407 12-APR-11
RMAN> reset database to incarnation 1;
database reset to incarnation 1
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
------- ------- -------- ---------------- --- ---------- ----------
2 2 ORCL 1276064171 PARENT 979911 12-APR-11
1 1 ORCL 1276064171 CURRENT 1094407 12-APR-11
RMAN> exit
Recovery Manager complete.
SQL> recover database using backup controlfile; --再次执行,问题已经解决
ORA-00279: change 1181302 generated at 04/13/2011 02:13:32 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011_04_13/o1_mf_1_7_%u_.arc
ORA-00280: change 1181302 for thread 1 is in sequence #7
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u01/app/oracle/oradata/orcl/redo01.log
ORA-00283: recovery session canceled due to errors
ORA-01244: unnamed datafile(s) added to control file by media recovery
ORA-01110: data file 6: '/u01/app/oracle/oradata/orcl/app01.dbf'
ORA-01112: media recovery not started
SQL> col error for a18
SQL> select * from v$recover_file;
FILE# ONLINE ONLINE_ ERROR CHANGE# TIME
---------- ------- ------- ------------------ ---------- ---------
6 ONLINE ONLINE FILE MISSING 0
SQL> col name for a50
SQL> select file#,name from v$datafile;
FILE# NAME
---------- --------------------------------------------------
1 /u01/app/oracle/oradata/orcl/system01.dbf
2 /u01/app/oracle/oradata/orcl/sysaux01.dbf
3 /u01/app/oracle/oradata/orcl/undotbs01.dbf
4 /u01/app/oracle/oradata/orcl/users01.dbf
5 /u01/app/oracle/oradata/orcl/example01.dbf
6 /u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED000
06
6 rows selected.
SQL> alter database rename file '/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00006' to '/u01/app/oracle/oradata/orcl/app01.dbf';
Database altered.
SQL> select file#,name from v$datafile;
FILE# NAME
---------- --------------------------------------------------
1 /u01/app/oracle/oradata/orcl/system01.dbf
2 /u01/app/oracle/oradata/orcl/sysaux01.dbf
3 /u01/app/oracle/oradata/orcl/undotbs01.dbf
4 /u01/app/oracle/oradata/orcl/users01.dbf
5 /u01/app/oracle/oradata/orcl/example01.dbf
6 /u01/app/oracle/oradata/orcl/app01.dbf
6 rows selected.
SQL> recover database using backup controlfile;
ORA-00279: change 1181454 generated at 04/13/2011 02:14:58 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011_04_13/o1_mf_1_7_%u_.arc
ORA-00280: change 1181454 for thread 1 is in sequence #7
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u01/app/oracle/oradata/orcl/redo01.log
Log applied.
Media recovery complete.
SQL> alter database open resetlogs;
Database altered.
到此成功恢复。
ORA-19909 参考:
http://blog.csdn.net/leishifei/archive/2011/04/13/6320926.aspx
SQL> startup mount;
ORACLE instance started.
Total System Global Area 6847938560 bytes
Fixed Size 2219808 bytes
Variable Size 3539992800 bytes
Database Buffers 3288334336 bytes
Redo Buffers 17391616 bytes
Database mounted.
SQL> recover database using backup controlfile;
ORA-00283: recovery session canceled due to errors
ORA-19909: datafile 1 belongs to an orphan incarnation
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
Cause & Background information
The standby database has been activated previously but since then reverted back into its standby role. Prior to the RMAN duplicate operation the "alter system reset control_files scope=spfile sid='*';" has not been executed (i.e. the control files have not been overwritten).
Analysis
Primary and standby have different incarnations:
在我的实验中,实验数据库是利用RMAN duplicate 生成的,猜想可能是这个原因造成的。
$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 13 15:33:18 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1276064171, not open)
RMAN> list incarnation of database;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
2 2 ORCL 1276064171 CURRENT 979911 12-APR-11
1 1 ORCL 1276064171 ORPHAN 1094407 12-APR-11
RMAN> reset database to incarnation 1;
database reset to incarnation 1
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
------- ------- -------- ---------------- --- ---------- ----------
2 2 ORCL 1276064171 PARENT 979911 12-APR-11
1 1 ORCL 1276064171 CURRENT 1094407 12-APR-11
RMAN> exit
Recovery Manager complete.
SQL> recover database using backup controlfile; --再次执行,问题已经解决
ORA-00279: change 1181302 generated at 04/13/2011 02:13:32 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011_04_13/o1_mf_1_7_%u_.arc
ORA-00280: change 1181302 for thread 1 is in sequence #7
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u01/app/oracle/oradata/orcl/redo01.log
ORA-00283: recovery session canceled due to errors
ORA-01244: unnamed datafile(s) added to control file by media recovery
ORA-01110: data file 6: '/u01/app/oracle/oradata/orcl/app01.dbf'
ORA-01112: media recovery not started
SQL> col error for a18
SQL> select * from v$recover_file;
FILE# ONLINE ONLINE_ ERROR CHANGE# TIME
---------- ------- ------- ------------------ ---------- ---------
6 ONLINE ONLINE FILE MISSING 0
SQL> col name for a50
SQL> select file#,name from v$datafile;
FILE# NAME
---------- --------------------------------------------------
1 /u01/app/oracle/oradata/orcl/system01.dbf
2 /u01/app/oracle/oradata/orcl/sysaux01.dbf
3 /u01/app/oracle/oradata/orcl/undotbs01.dbf
4 /u01/app/oracle/oradata/orcl/users01.dbf
5 /u01/app/oracle/oradata/orcl/example01.dbf
6 /u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED000
06
6 rows selected.
SQL> alter database rename file '/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00006' to '/u01/app/oracle/oradata/orcl/app01.dbf';
Database altered.
SQL> select file#,name from v$datafile;
FILE# NAME
---------- --------------------------------------------------
1 /u01/app/oracle/oradata/orcl/system01.dbf
2 /u01/app/oracle/oradata/orcl/sysaux01.dbf
3 /u01/app/oracle/oradata/orcl/undotbs01.dbf
4 /u01/app/oracle/oradata/orcl/users01.dbf
5 /u01/app/oracle/oradata/orcl/example01.dbf
6 /u01/app/oracle/oradata/orcl/app01.dbf
6 rows selected.
SQL> recover database using backup controlfile;
ORA-00279: change 1181454 generated at 04/13/2011 02:14:58 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011_04_13/o1_mf_1_7_%u_.arc
ORA-00280: change 1181454 for thread 1 is in sequence #7
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u01/app/oracle/oradata/orcl/redo01.log
Log applied.
Media recovery complete.
SQL> alter database open resetlogs;
Database altered.
到此成功恢复。
ORA-19909 参考:
http://blog.csdn.net/leishifei/archive/2011/04/13/6320926.aspx
相关文章推荐
- ORA-19909 datafile 1 belongs to …
- ORA-19909: datafile string belon…
- ORA-01157: cannot identify/lock data file n 故障一例
- How to: Write Object Data to an XML File
- How To Generate An XML File As A Target Datastore Using ODI In An Integration Interface ? [ID 454268
- ORA-01111: name for data file 119 is unknown - rename to correct file
- How to use an ActiveX script task to import data into a new Excel file
- linux oracle ORA-01221: data file 1 is not the same file to a background process
- ORA-01110 ORA-01111: name for data file 69 is unknown - rename to correct file
- Alert: Querying v$asm_file Gives ORA-15196 After ASM Was Upgraded From 10gR2 To 11gR2 with an AU size > 1M [ID 1145365.1]
- a universal class to complete import data from an excel file into a database
- Use jQuery To Retrieve Data From An XML File
- ORA-01180: can not create datafile 1 :解决一例
- Connected to an idle instance/ ORA-01034/ ORA-27101
- ORA-27086: unable to lock file - already in use
- Using Oracle Data Pump to create an external table
- Export data out to file from sql server
- svn问题之一: Failed to add file 'xxx': an unversioned file of the same name already exists
- How to read data from a file in reverse order?
- [ERROR]-Error: failure: repodata/filelists.xml.gz from addons: [Errno 256] No more mirrors to try.