重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1406|回复: 0
打印 上一主题 下一主题

[Oracle] RMAN-06026 RMAN-06023异常处理

[复制链接]
跳转到指定楼层
楼主
发表于 2022-7-18 19:11:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
数据库:oracle11.2.0.4
系统:Centos7.9
异常描述:rman异机恢复时,报错RMAN-06026RMAN-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
显示找不到无备份文件,检查datafile2datafile3的备份文件.
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
结论:显示datafile2datafile3的备份都有效.
目标库查看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
结论:再次执行恢复,无异常发生.

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-9-28 06:20 , Processed in 0.105245 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表