ora-1203 RMAN Duplicate Fails To Create Tempfiles With Errors ORA-01186/ORA-01122/ORA-01206/ORA-01203

如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!

诗檀软件专业数据库修复团队

服务热线 : 13764045638 QQ号:47079569 邮箱:service@parnassusdata.com

 

oerr ora 1203
01203, 00000, "wrong incarnation of this file - wrong creation SCN"
// *Cause: The creation SCN in the file header is not the same as the
// creation SCN in the control file. This is probably a copy of a
// file that was dropped.
// *Action: Restore a current copy of the data file and do recovery as needed.


 

症状

RMAN复制阶段,创建临时文件时我们在辅助实例中看到以下错误:

ORA-01186: file 1025 failed verification tests
ORA-01122: database file 1025 failed verification check
ORA-01110: data file 1025: ‘/u01/oradata/temp_01.dbf’
ORA-01206: file is not part of this database – wrong database id
File 1025 not verified due to error ORA-01122

或者

ORA-01186: file 1025 failed verification tests
ORA-01122: database file 1025 failed verification check
ORA-01110: data file 1025: ‘/u01/oradata/temp_01.dbf’
ORA-01203: wrong incarnation of this file – wrong creation SCN
File 1025 not verified due to error ORA-01122

该复制操作不会失败。以上错误只会影响辅助实例中临时文件的创建。

原因

当复制数据库,且辅助实例临时文件预先存在于操作系统上时,有关临时文件的ORA-01122错误才会发生。

当首次运行复制,且操作系统上不存在临时文件时,复制才能正常进行,并成功创建临时文件。辅助实例的警报日志记录条目如下:

Tue Jun 27 13:10:28 2006
Errors in file /apps/oracle/admin/AUX/bdump/aux_dbw0_19957.trc:
ORA-01186: file 201 failed verification tests
ORA-01157: cannot identify/lock data file 201 – see DBWR trace file
ORA-01110: data file 201: ‘/u002/oradata/AUX/temp01.dbf’                  <– expected error as file does not exist.
Tue Jun 27 13:10:28 2006
File 201 not verified due to error ORA-01157
Tue Jun 27 13:10:28 2006
Dictionary check complete
Tue Jun 27 13:10:28 2006
SMON: enabling tx recovery
Tue Jun 27 13:10:28 2006
Re-creating tempfile /u002/oradata/AUX/temp01.dbf                <– Tempfiles are added correctly.
Database Characterset is WE8ISO8859P1
RMAN复制尝试将临时文件添加到辅助数据库。首次进行复制时,该临时文件不是实际存在,所以Oracle会发出ORA- 01186 / ORA- 01157,并继续创建临时文件。

然而,当辅助临时文件已经存在(前面复制尝试成功创建的),则Oracle 无法添加临时文件到辅助实例,将发出ORA-01186/ORA-01122/ORA-01203 或 ORA-01186/ORA-01122/ORA-01206。

解决方案

错误出现后,你仅需连接到辅助实例并手动添加临时文件。

为避免以后出现这种错误,开始复制操作时,确保你清除了辅助实例的数据文件和临时文件。再次尝试复制之前,你可以使用DROP DATABASE命令删除辅助实例的所有文件,这样当RMAN为辅助实例创建临时文件时,我们就不会面临ORA- 01122错误。

下面是使用DROP DATABASE清除数据库所有文件(数据文件/临时文件/重做日志/控制文件/参数文件)的一个例子:

From SQL*PLUS connect to the database that needs to be dropped and mount in exclusive mode:
SQL> startup mount exclusive;
SQL> alter system enable restricted session;
SQL> exit;

From RMAN, connect to the database that needs to be dropped as target and execute:
RMAN> drop database including backups;

或者,如果你不想使用DROP DATABASE命令,可以使用V$DATAFILE 和 V$TEMPFILE 视图来查看辅助数据库的数据文件和临时文件路径,并在再次开始复制前手动删除它们。

 

Comment

*

沪ICP备14014813号-2

沪公网安备 31010802001379号