RMAN-600(8201)错误的重现

前两天,客户的数据库在执行CATALOG方式的备份时出现了RMAN-600(8201)错误。由于比较了解客户的环境,在加上客户本身对于系统的了解,使得成功的模拟出这个错误。
RMAN-600(8201)错误:http://yangtingkun.net/?p=690
其实重现这个错误并不算太复杂,要求数据库的版本是10.2.0.3以下。
首先搭建一套DATA GUARD环境。然后在备库启用数据库的FLASHBACK功能,创建一个恢复点,然后将备库激活打开。备库打开后就可以关闭,然后重新MOUNT数据库,并利用FLASHBACK将数据库回滚到激活之前的恢复点,然后利用ALTER DATABASE CONVERT命令再次将这个数据库转化为物理备库,DATA GUARD环境恢复后,使备库应用日志一直到和主库保持一致,然后进行一次DATA GUARD的SWITCHOVER的操作,使得备库变成主库,主库变成备库。
这时,对新的主库创建CATALOG,执行REGISTER DATABASE后,执行show all命令,就会重新错误。

[orat1@hpserver2 ~]$ rman target / catalog rcat_user/rcat_password
Recovery Manager: Release 10.2.0.3.0 - Production ON Sat Apr 4 20:51:56 2012
Copyright (c) 1982, 2005, Oracle. ALL rights reserved.
connected TO target DATABASE: TEST10G (DBID=1030910857)
connected TO recovery catalog DATABASE
RMAN> SHOW ALL;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # DEFAULT
CONFIGURE BACKUP OPTIMIZATION OFF; # DEFAULT
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # DEFAULT
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # DEFAULT
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # DEFAULT
CONFIGURE DEVICE TYPE DISK PARALLELISM 5 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # DEFAULT
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # DEFAULT
CONFIGURE MAXSETSIZE TO UNLIMITED; # DEFAULT
CONFIGURE ENCRYPTION FOR DATABASE OFF; # DEFAULT
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # DEFAULT
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure OF SHOW command at 04/04/2012 20:52:16
RMAN-00600: internal error, arguments [8201] [] [] [] []

显然导致问题产生的主要原因是由于DATA GARUD的备库曾经使用FAILOVER打开过,虽然通过FLASHBACK进行过回滚,但是FAILOVER会导致RESETLOG,当切换为主库后,RESETLOG信息保留在控制文件中,而Oracle在创建CATALOG时策略存在问题,虽然Oracle能分辨CURRENT和ORPHAN的INCARNATION,但是在进行同步的时候,Oracle会尝试读取RESETLOGS最大的记录从而引发了同步的异常。

This entry was posted in BUG and tagged , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *