复制活动的数据库报ORA-01194错误如果一个线程关闭
适用于:
Oracle Server - Enterprise Edition - Version: 11.1.0.7 - Release: 11.1
Information in this document applies to any platform.
症状
RMAN 复制RAC数据库到一个单实例使用 FROM ACTIVE DATABASE失败在恢复之后报如下错误:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/d13dwh/oradata1/d13dwh/datafile/system.2990.703705425'
Inspection of duplicate log shows:
RMAN-08161: contents of Memory Script:
{
set until scn 42092895854;
recover
clone database
delete archivelog
;
}
Inspection of file headers in auxilliary database shows the checkpoint scn of all the restored files is AHEAD of the untilscn calculated by duplicate:
STATUS TO_CHAR(CHECKPOINT_CHANGE#) CHECKPOINT_TIME COUNT(*)
------- ---------------------------------------- -------------------- ----------
ONLINE 42375119996 27-JAN-2010 19:06:03 1
ONLINE 42375695392 27-JAN-2010 19:24:20 1
ONLINE 42376080410 27-JAN-2010 19:38:15 1
...etc
如果尝试手动完全恢复,将报如下错误:
ORA-00600: internal error code, arguments: [kcvhvdf_1], [], [], [], [], [], [], [], [], [], [], []
跟踪文件将显示如下:
----- Current SQL Statement for this session (sql_id=agzpkm7s74893) -----
ALTER DATABASE RECOVER database using backup controlfile
----- Call Stack Trace -----
Kgeasnmierr Kcvhvdf Krdsmr adbdrv
原因:
RAC的一个线程在复制运行的时候被关闭。从活动的数据复制是从所有的线程中查询v$archived_log, v$thread和v$database 来找到最高的next_change# 值。然后用 LOWEST值并使用它作为复制 untilscn值。如果所有的线程是打开的,那么在每个线程的最大值将几乎没有选择,不管是什么值。它将与当前活动数据文件的SCN联系起来。
查询v$archived_log使用计算untilscn价值:
SQL>alter session set nls_date_format='dd-moin-rr hh24:mi:ss';
select recid, stamp, thread#, sequence#, first_time, first_change#, next_time, next_change# from v$archived_log where next_change#=42092895854;
RECID STAMP THREAD# SEQUENCE# FIRST_TIME FIRST_CHANGE#
---------- ---------- ---------- ---------- ------------------ -------------
NEXT_TIME NEXT_CHANGE#
------------------ ------------
7390 708793125 2 3465 20-jan-10 14:58:44 4.2093E+10
20-jan-10 14:58:44 4.2093E+10
仔细查看线程2的警告日志显示它已经于一月20号被关闭因此该复制计算 untilscn是非常老的。
解决方案
确定所有的线程是打开的状态当你从一个RAC活动的数据库运行复制。
打开线程2将生成一个新的线程2的检查点
显示相关信息
产品
* Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition
错误号
ORA-600[KCVHVDF_1]; RMAN-8161; ORA-1110; ORA-1547; ORA-1194