一. 问题场景:
本周做了一次将oracle 11g RAC+asm数据库全备份,然后把备份恢复到异机单实例的测试。
在recover database、并重建控制文件后,打开数据库时,出现此错误:
----打开数据库
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-38856: cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled
二. 解决方法一
ORA-38856: Cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled
Example:
In the example below the error Occurred while performing an open resetlogs on a 10.2.0.3 Oracle Single Instance Database
Server prior to restoring an RMAN backup of and Oracle Database. The RMAN backup was taken from a RAC Database Server
and restored to a Single Instance Box.
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-38856: cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled
alter database open resetlogs
*
ERROR at line 1:
ORA-38856: cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled
Details:
ORA-38856: cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled.
Oracle bug, 4355382 ORA-38856: FAILED TO OPEN DATABASE WITH RESETLOGS WHEN USING RAC BACKUP, exists in the
Oracle 10g release 2.0 that affects backups taken from a RAC database. The problem is related to the number of threads
used by the source database and an expectation that the cloned database must have an identical number of threads.
ORA-38856 is the expected error during open database resetlogs when the set of enabled instances (redo threads) in the controlfile does not match the set of enabled instances (redo threads) in datafile checkpoint. This is expected behavior in a normal RAC restore/recover/open resetlogs situation.
这句话的意思是:数据库在resetlogs的时候发现控制文件中的redo threads和数据文件checkpoint的redo threads不一致,从而出现该问题。数据库在异常恢复过程中需要读取节点2的redo信息,现在无法读取从而出现该错误。
Solution:
1. Set the following parameter in the auxiliary init.ora file: _ no_recovery_through_resetlogs=TRUE.
2. Open the database in resetlogs mode.
3. Remove _ no_recovery_through_resetlogs=TRUE from init.ora.
4. Restart database.
成功打开数据库。
-----以上内容 可以参考:RMAN Duplicate from RAC backup fails ORA-38856 (Doc ID 334899.1)
二. 解决方法二
在oracle11g的官方文档中,对该错误的解释为:
ORA-38856: cannot mark instance string (redo thread string) as enabled
Cause:
The open resetlogs or standby activation operation failed because it needs to mark an instance (redo thread) as enabled. However, it had less than 2 online redo logs, which prevented it from being enabled.
Action:
Add more logfiles to the specified instance and retry the command.
因为在备份数据库上有4组在线日志 :
GROUP# THREAD# SEQUENCE#
1 1 1473
2 1 1472
3 2 199
4 2 200
于是再增加两个 thread 2的 redo log 文件:
SQL> ALTER DATABASE ADD LOGFILE THREAD 2
GROUP 3 '/u01/app/oradata/imddb/redo3_01.log' SIZE 50M,
GROUP 4 '/u01/app/oradata/imddb/redo4_01.log' SIZE 50M;
SQL> ALTER DATABASE OPEN RESETLOGS;
Database altered.
数据库成功打开。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20641/viewspace-1286934/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/20641/viewspace-1286934/