咨询微信: dbservice1234 7 x 24 在线支持!

    你在这里

    • You are here:
    • 首页 > 博客 > PDSERVICE的博客 > Oracle 如果对被还原数据库/AUXILIARY指定了错误的undo表空间,在打开(克隆)RMAN RESTORE / DUPLICATE时失败显示ORA-01139 / ORA-16433: 必须以读/写模式打开数据库

Oracle 如果对被还原数据库/AUXILIARY指定了错误的undo表空间,在打开(克隆)RMAN RESTORE / DUPLICATE时失败显示ORA-01139 / ORA-16433: 必须以读/写模式打开数据库

Oracle 如果对被还原数据库/AUXILIARY指定了错误的undo表空间,在打开(克隆)RMAN RESTORE / DUPLICATE时失败显示ORA-01139 / ORA-16433: 必须以读/写模式打开数据库

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

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

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

 

ORA-16433: 必须以读/写模式打开数据库

 

适用于:

Oracle Database – Enterprise Edition – 版本 11.2.0.3 及以上
本文信息适用于任何平台。

症状

当错误undo表空间在辅助pfile中指定时,RMAN Duplicate无法打开CLONE显示ORA-01139 / ORA-16433 :

内存脚本Memory Script内容:
{
Alter clone database open resetlogs;
}
executing Memory Script
}
executing Memory Script

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00601: fatal error in recovery manager
RMAN-03004: fatal error during execution of command
RMAN-10041: Could not re-create polling channel context following failure.
RMAN-10024: error setting up for rpc polling
RMAN-10005: error opening cursor
RMAN-10002: ORACLE error: ORA-03114: not connected to ORACLE
RMAN-03002: failure of Duplicate Db command at 10/10/2012 14:27:10
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-06136: ORACLE error from auxiliary database: ORA-01092: ORACLE instance ter
minated. Disconnection forced
ORA-30012: undo tablespace ‘UNDOTBS1X’ does not exist or of wrong type

尝试手动恢复解决问题的所有操作失败:

使用SQLPlus

SQL> recover database using backup controlfile until cancel;
ORA-00283: recovery session canceled due to errors
ORA-16433: The database must be opened in read/write mode.

SQL> alter database backup controlfile to trace;
alter database backup controlfile to trace
*
ERROR at line 1:
ORA-16433: The database must be opened in read/write mode.

使用RMAN
RMAN> recover clone database;
RMAN-11003: failure during parse/execution of SQL statement: alter database
recover if needed
start until cancel using backup controlfile
ORA-00283: recovery session canceled due to errors
ORA-16433: The database must be opened in read/write mode.

 

 

原因

辅助pfile 指定一个不在数据库中的无效undo_tablespace 名称被复制。
这导致辅助在使用resetlogs打开后立即失败。

<Bug 14744052>   AFTER FAILURE OF DUPICATE COMMAND DURING OPEN RESETLOGS, CLONE RAISES ORA-16433

Closed:  Not a Bug

一个标志(flag在resetlogs期间在辅助pfile中被设置,然后在resetlogs成功完成时通过字典检查取消设置。由于resetlogs未完成,标志仍被设置导致每当控制文件随后被访问时发生ORA-16433。没有办法清除这个标志。
解决方案

使用从目标生成的创建控制文件脚本的编辑版本重建控制文件: How to Recreate a Controlfile (Doc ID 735106.1)

辅助警报日志显示一个 resetlogs完成且将为sequence# 1识别联机日志:

Thread 1 opened at log sequence 1
Current log# 1 seq# 1 mem# 0: C:\APP\DUP\REDO01.LOG
要完成进程:

– 更正辅助pfile中的undo_tablespace参数。
– 使用新创建的控制文件重新mount 辅助
– 恢复并使用resetlogs打开

SQL> recover database using backup controlfile;
ORA-00279: change 2023230 generated at 10/10/2012 14:27:01 needed for thread 1
ORA-00289: suggestion :
C:\APP\FAST_RECOVERY_AREA\DUP\ARCHIVELOG\2012_10_10\O1_MF_1_1_%U_.ARC
ORA-00280: change 2023230 for thread 1 is in sequence #1

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
C:\APP\DUP\REDO01.LOG
Log applied.
Media recovery complete.
SQL> alter database open resetlogs;

Database altered.

 

注: 要在未来避免这一错误,确保你对辅助指定与当前数据库设置相同的UNDO_TABLESPACE参数。如果复制一个RAC 目标数据库,你能对辅助指定任何目标实例的 undo_tablespace。

 

注:
—–
如果指定错误的undo表空间,然后在RMAN还原和恢复后尝试打开数据库resetlogs ,相同错误ORA-01139 / ORA-16433 也会被报告。

 

参考

BUG:14744052 – AFTER FAILURE OF DUPICATE COMMAND DURING OPEN RESETLOGS, CLONE RAISES ORA-16433
NOTE:360962.1 – Manual Completion of a Failed RMAN Backup based Duplicate