重庆思庄Oracle、Redhat认证学习论坛
标题: RMAN-06026 RMAN-06023异常处理 [打印本页]
作者: denglj 时间: 2022-7-18 19:11
标题: RMAN-06026 RMAN-06023异常处理
数据库:oracle11.2.0.4
系统:Centos7.9
异常描述:rman异机恢复时,报错RMAN-06026、RMAN-06023,如下所示:
RMAN>run{
2> setnewname for datafile '+DATA/orcl/datafile/system.256.1107818145' to'/data/orcl/system.256.1107818145';
3> setnewname for datafile '+DATA/orcl/datafile/undotbs2.267.1107818231' to'/data/orcl/undotbs2.267.1107818231';
4> setnewname for datafile '+DATA/orcl/datafile/system.319.1110101255' to'/data/orcl/system.319.1110101255';
5> setnewname for datafile '+DATA/orcl/datafile/sysaux.257.1107818147' to'/data/orcl/sysaux.257.1107818147';
6> setnewname for datafile '+DATA/orcl/datafile/undotbs1.258.1107818147' to'/data/orcl/undotbs1.258.1107818147';
7> setnewname for datafile '+DATA/orcl/datafile/users.259.1107818147' to '/data/orcl/users.259.1107818147';
8>restore database;
9> }
executingcommand: SET NEWNAME
executingcommand: SET NEWNAME
executingcommand: SET NEWNAME
executingcommand: SET NEWNAME
executingcommand: SET NEWNAME
executingcommand: SET NEWNAME
Startingrestore at 17-JUL-22
usingchannel ORA_DISK_1
RMAN-00571:===========================================================
RMAN-00569:=============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571:===========================================================
RMAN-03002:failure of restore command at 07/17/2022 00:44:01
RMAN-06026:some targets not found - aborting restore
RMAN-06023:no backup or copy of datafile 3 found to restore
RMAN-06023:no backup or copy of datafile 2 found to restore
显示找不到无备份文件,检查datafile2和datafile3的备份文件.
RMAN>list backup of datafile 3;
List ofBackup Sets
===================
BSKey Type LV Size Device Type Elapsed Time Completion Time
----------- -- ---------- ----------- ------------ ---------------
13 Full 407.97M DISK 00:00:00 15-JUL-22
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20220715T094249
Piece Name:/home/oracle/backupset/data_0212lk4p_1_1.bak
List of Datafiles in backup set 13
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
3 Full 1209511 15-JUL-22+DATA/orcl/datafile/undotbs1.258.1107818147
RMAN>list backup of datafile 2;
List ofBackup Sets
===================
BSKey Type LV Size Device Type Elapsed Time Completion Time
----------- -- ---------- ----------- ------------ ---------------
13 Full 407.97M DISK 00:00:00 15-JUL-22
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20220715T094249
Piece Name:/home/oracle/backupset/data_0212lk4p_1_1.bak
List of Datafiles in backup set 13
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
2 Full 1209511 15-JUL-22+DATA/orcl/datafile/sysaux.257.1107818147
结论:显示datafile2和datafile3的备份都有效.
目标库查看incarnatioin记录:
RMAN>list incarnation;
List ofDatabase Incarnations
DBKey Inc Key DB Name DB ID STATUS Reset SCN Reset Time
-------------- -------- ---------------- --- ---------- ----------
1 1 ORCL 1635598952 PARENT 1 24-AUG-13
2 2 ORCL 1635598952 PARENT 925702 19-JUN-22
3 3 ORCL 1635598952 CURRENT 1209510 16-JUL-22
源库查看incarnatioin记录:
RMAN>list incarnation;
usingtarget database control file instead of recovery catalog
List ofDatabase Incarnations
DBKey Inc Key DB Name DB ID STATUS Reset SCN Reset Time
-------------- -------- ---------------- --- ---------- ----------
1 1 ORCL 1635598952 PARENT 1 24-AUG-13
2 2 ORCL 1635598952 CURRENT 925702 19-JUN-22
说明:源库显示只有两个reset scn记录,目标库控制文件从源库还原得来,但却显示存在三次记录.
解决方案:
将目标库重置为incarnation2,.
RMAN>reset database to incarnation 2;
databasereset to incarnation 2
RMAN>run{
2> setnewname for datafile'+DATA/orcl/datafile/system.256.1107818145' to'/data/orcl/system.256.1107818145';
3> setnewname for datafile'+DATA/orcl/datafile/undotbs2.267.1107818231' to'/data/orcl/undotbs2.267.1107818231';
4> setnewname for datafile'+DATA/orcl/datafile/system.319.1110101255' to'/data/orcl/system.319.1110101255';
5> setnewname for datafile'+DATA/orcl/datafile/sysaux.257.1107818147' to'/data/orcl/sysaux.257.1107818147';
6> setnewname for datafile'+DATA/orcl/datafile/undotbs1.258.1107818147' to'/data/orcl/undotbs1.258.1107818147';
7> setnewname for datafile'+DATA/orcl/datafile/users.259.1107818147' to '/data/orcl/users.259.1107818147';
8>restore database;
9> }
executingcommand: SET NEWNAME
executingcommand: SET NEWNAME
executingcommand: SET NEWNAME
executingcommand: SET NEWNAME
executingcommand: SET NEWNAME
executingcommand: SET NEWNAME
Startingrestore at 17-JUL-22
usingchannel ORA_DISK_1
channelORA_DISK_1: starting datafile backup set restore
channelORA_DISK_1: specifying datafile(s) to restore from backup set
channelORA_DISK_1: restoring datafile 00001 to /data/orcl/system.256.1107818145
channelORA_DISK_1: restoring datafile 00004 to /data/orcl/users.259.1107818147
channelORA_DISK_1: restoring datafile 00006 to /data/orcl/system.319.1110101255
channelORA_DISK_1: reading from backup piece/home/oracle/backupset/data_0112lk4p_1_1.bak
channelORA_DISK_1: piece handle=/home/oracle/backupset/data_0112lk4p_1_1.baktag=TAG20220715T094249
channelORA_DISK_1: restored backup piece 1
channelORA_DISK_1: restore complete, elapsed time: 00:00:25
channelORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1:specifying datafile(s) to restore from backup set
channelORA_DISK_1: restoring datafile 00002 to /data/orcl/sysaux.257.1107818147
channelORA_DISK_1: restoring datafile 00003 to /data/orcl/undotbs1.258.1107818147
channelORA_DISK_1: restoring datafile 00005 to /data/orcl/undotbs2.267.1107818231
channelORA_DISK_1: reading from backup piece/home/oracle/backupset/data_0212lk4p_1_1.bak
channelORA_DISK_1: piece handle=/home/oracle/backupset/data_0212lk4p_1_1.baktag=TAG20220715T094249
channel ORA_DISK_1:restored backup piece 1
channelORA_DISK_1: restore complete, elapsed time: 00:00:25
Finishedrestore at 17-JUL-22
结论:再次执行恢复,无异常发生.
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) |
Powered by Discuz! X3.2 |