7 x 24 在线支持!
处理Oracle RMAN-06023或RMAN-06025
如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!
诗檀软件专业数据库修复团队
服务热线 : 13764045638 QQ号:47079569 邮箱:service@parnassusdata.com
[oracle@vrh8 ~]$ oerr rman 6023 6023, 1, "no backup or copy of datafile %d found to restore" // *Cause: A datafile, tablespace, or database restore could not proceed // because no backup or copy of the indicated file was found. // It may be the case that a backup or copy of this file exists but // does not satisfy the criteria specified in the user's restore // operands. // *Action: None - this is an informational message. See message 6026 for // further details. [oracle@vrh8 ~]$ oerr rman 6025 6025, 1, "no backup of log thread %d seq %d lowscn %s found to restore" // *Cause: An archive log restore restore could not proceed // because no backup of the indicated archived log was found. // It may be the case that a backup of this file exists but // does not satisfy the criteria specified in the user's restore // operands. // *Action: None - this is an informational message. See message 6026 for // further details.
适用于:
Oracle Database – Enterprise Edition – Version 9.0.1.0 and later
本文信息适用于任何平台。
症状
你收到以下错误:
RMAN-06025: no backup of archived log for thread 1 with sequence 19684 and starting SCN of 1483914453 found to restore
OR
RMAN-06023: no backup or copy of datafile 4 found to restore
原因
当无法识别备份文件是归档日志文件(RMAN-06025)还是数据文件(RMAN-06023),这些错误由RMAN返回。
解决方案
1. 使用RMAN连接到你运行还原所在的实例(或在运行RMAN复制时的目标)并发出:
RMAN-06025: 无归档日志的备份…….
RMAN> list backup of archivelog sequence <sequence# returned by error>;
例如:
RMAN> list backup of archivelog sequence 19684;
RMAN-06023: 无数据文件的备份……
RMAN> list backup of datafile <number returned by the error>;
例如:
RMAN> list backup of datafile 4;
2. 如果没有返回的备份:
a. 查看你是否应连接到一个目录。
b. 如果没有使用的目录,你需要对包含文件(归档日志或数据文件)的备份创建目录。要这么做,执行:
RMAN> catalog start with ‘/location of backup/’ noprompt;
如果备份在磁带,查看:
Note 550082.1 How to Catalog Tape Backup Pieces
c. 考虑还原一个包含备份信息的控制文件。
3. 如果RMAN返回了备份信息:
a. 查看备份的状态是否可用。
例如:
RMAN> list backup of datafile 4;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
291 Full 1.06G DISK 00:00:15 27-JUL-15
BP Key: 292 Status: AVAILABLE Compressed: NO Tag: TAG20150727T144532
Piece Name: /u01/oradata/V1124/d8qd3psc_1_1
b. 对于数据文件,查看备份中的数据文件的Ckp SCN/Ckp Time是否在还原/复制所指定的until之前:
例如:
RMAN> list backup of datafile 4;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— ——————–
291 Full 1.06G DISK 00:00:15 27-JUL-2015 14:45:47
BP Key: 292 Status: AVAILABLE Compressed: NO Tag: TAG20150727T144532
Piece Name: /u01/oradata/V1124/d8qd3psc_1_1
List of Datafiles in backup set 291
File LV Type Ckp SCN Ckp Time Name
—- — —- ———- ——————– —-
4 Full 59195530 27-JUL-2015 14:45:32 /u01/oradata/V1124/users01.dbf
c. 查看你想要使用的备份是否在CURRENT incarnation中。
例如:
RMAN> list incarnation;
using target database control file instead of recovery catalog
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
——- ——- ——– —————- — ———- ———-
1 1 V1124 82280094 PARENT 1 19-JUN-2015 10:31:58
2 2 V1124 82280094 CURRENT 59448598 29-JUL-2015 12:45:27
在这个情况下,显然27-JUL-2015的备份未在CURRENT incarnation, Reset Time=29-JUL-2015。要还原数据文件4的备份,必须要重置incarnation。
例如:
RMAN> reset database to incarnation 1;
database reset to incarnation 1
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
——- ——- ——– —————- — ———- ———-
1 1 V1124 82280094 CURRENT 1 19-JUN-2015 10:31:58
2 2 V1124 82280094 ORPHAN 59448598 29-JUL-2015 12:45:27
注意: 如果你的归档日志文件获得 ‘specification does not match any archive log..’ ,这就略有不同。该错误表示控制文件不知道现有的archivelog file vs backup。参阅 Note 869671.1 RMAN List / Delete error with “specification does not match any archive log…”