RMAN-06172 Troubleshooting
今天在RMAN还原测试过程中,遇到了"RMAN-06172: no autobackup found or specified handle is not a valid copy or piece"这个错误,如下所示:
RMAN> restore spfile to pfile "/u01/app/oracle/product/10.2.0/db_1/dbs/initSCM2.ora"
from "/u04/backup/backupsets/ora_cfc-4095319980-20180327-00";
Starting restore at 28-MAR-18
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/28/2018 14:20:12
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
当然,此处是还原参数文件,其实还原控制文件或其它数据文件都会遇到这个错误,关于这个错误,官方解释为:
Versions 11.1, 11.2, 12.1
Error: RMAN-06172 no AUTOBACKUP found or specified handle is not a valid copy or piece
---------------------------------------------------------------------------
Cause: A restore could not proceed because no AUTOBACKUP was found or
specified handle is not a valid copy or backup piece. In case of
restore from AUTOBACKUP, it may be the case that a backup exists, but
it does not satisfy the criteria specified in the user's restore
operands. In case of restore from handle, it may be the handle is not a
backup piece or control file copy. In may be that it does not exist.
Action: Modify AUTOBACKUP search criteria or verify the handle.
Versions 9.2, 10.1, 10.2
Error: RMAN-06172 no autobackup found or specified handle is not a valid copy or piece
---------------------------------------------------------------------------
Cause: A restore could not proceed because no autobackup was found or
specified handle is not a valid copy or backup piece. In case of
restore from autobackup, it may be the case that a backup exists, but
it does not satisfy the criteria specified in the user's restore
operands. In case of restore from handle, it may be the handle is not a
backup piece or controflile copy. In may be that it does not exist.
Action: Modify autobackup search criteria or verify the handle.
导致RMAN-06172错误的原因如上,但是引起这个错误的场景非常多, 个人总结了一下,大概可以从下面几个方面去判别、分析:
1:备份集过期或备份文件不存在
RMAN> list backup of controlfile;
RMAN> list backup of spfile;
如果备份集文件不存在,那么肯定会报这个错误,另外backuppiece过期了,那么上面命令就会显示spfile或controlfile过期(expired),此时需要运行类似下面命令来解决问题。
RMAN> crosscheck backup of controlfile;
备份集有两种状态A(Available,RMAN认为该项存在于备份介质上);X(Expired,备份存在于控制文件或恢复目录中,但是并没有物理存在于备份介质上)
crosscheck backup 命令的目的是检查RMAN的目录以及物理文件,如果物理文件不存在于介质上,将标记为Expired。如果物理文件存在,将维持Available。
如果原先标记为Expired的备份集再次存在于备份介质上(如恢复了损坏的磁盘驱动器后),crosscheck backup将把状态重新从Expired标记回Available。
还有一种情况是从自动备份还原出现RMAN-06172错误。这个是因为备份集不存在了,也可以通过list backup of xxx查看确认。
RMAN> restore spfile from autobackup;
2:RMAN通道(CHANNEL)配置不正确
参考官方文档:Restore of controlfile autobackup using LiteSpeed (tape) fails with RMAN-06172 (文档 ID 2021758.1)
原因分析:
LiteSpeed requires a tape channel to be allocated. A disk channel will not work even though when using LiteSpeed you can see the controlfile backup on disk. If a 'list backup of controlfile" shows the backup as on tape, a tape channel must be allocated.
LiteSpeed
需要分配一个磁带通道。 即使使用LiteSpeed,磁盘通道也不起作用,您可以在磁盘上看到控制文件备份。 如果“控制文件的列表备份”将备份显示为磁带上,则必须分配磁带通道。
解决方案:
Use a run block with a tape channel allocation:
run {
allocate channel dev device type 'sbt_tape';
restore controlfile from '<full path/file name to controlfile backup>';
release channel dev;
}
3:Media Manager安装错误
参考官方文档Cannot restore controlfile from RMAN backup (文档 ID 1054412.1)
解决方案:
After reinstalling the Lite Speed Media Manager the controlfile was able to restore successfully.
Support for third party Media Management software that interacts with RMAN is provided by the 3rd party software vendo
4:文件权限问题
个人遇到的这个案例中,在root账号下使用SFTP拷贝了备份文件,文件的属主为root用户,而RMAN命令运行在oracle用户下,所以在还原时,由于权限问题,RMAN认为文件不存在,从而报RMAN-06172错误。
这种情况的判别、验证步骤如下:
1: 找到对应的备份文件
list backup of xxx
2: 使用ls -lrt 检查文件权限属性。
3: 修改备份文件的属主
chown oracle:oinstall *
RMAN-06172 Troubleshooting的更多相关文章
- [Oracle][RMAN] Use RMAN to Migrate database from CentOS_5-11201-SingleDB to OracleLinux_5-11204-SingleDB
リンク:How to Move/Restore DB to New Host and File System using RMAN (Doc ID 1338193.1)https://docs.ora ...
- 如何利用RMAN Debug和10046 Trace来诊断RMAN问题?
在做Support的这些年,我很大的收获是掌握了许多troubleshooting问题的方法和工具,对于每一类问题,都可以大体归类出一些诊断方法.无论问题多么复杂,像扒洋葱一样,一层层去掉无 ...
- 【RMAN】RMAN跨版本恢复(下)--大版本异机恢复
[RMAN]RMAN跨版本恢复(下)--大版本异机恢复 BLOG文档结构图 ORACLE_SID=ORA1024G 关于10g的跨小版本恢复参考:http://blog.chinaunix.net/u ...
- RMAN异机恢复快速参考
应用场景:服务器A为正常运行的生产环境,需要在服务器B上部署一套相同环境做测试. 数据库环境:RHEL6.4 + Oracle 11.2.0.4.7 一. 服务器A备份数据库 1.1 在线备份(数据库 ...
- 用RMAN备份EBS数据库的脚本
rman_bak.sh rman target / nocatalog log=/d01/rmanbak/bak_`date +%m%d%H%M`.log<< EOF run { c ...
- RAC+asm通过rman恢复到单实例+asm
1.恢复参数文件,并修改参数文件 参数文件指名几个最简单的就行,我的参数文件如下: 2.恢复控制文件,并启动数据库到mount 如果是把备份集从别的服务器拷贝到本地恢复的服务器的目录,使用下面的语句指 ...
- network issue troubleshooting
Today we troubleshooting a lot of network issue by using commands like: ping <ip>/<computer ...
- RMAN Catalog创建、配置和管理
环境:RHEL6.4 + Oracle 11.2.0.4 一.创建数据库catdb 1.1 官档的建库脚本示例 1.2 根据我实际环境修改如下项 1.3 创建必要目录并赋予权限 1.4 执行脚本建库 ...
- 使用RMAN创建复制数据库
我的实验环境: - 源数据库A机: RHEL6.4 + Oracle 11.2.0.4 IP地址:192.168.99.159 db_name=oradb 数据库已正常运行 - 复制数据库B机: RH ...
- DG环境数据库RMAN备份策略制定
DG环境数据库RMAN备份策略制定: 主库(Primary) 全库备份 归档备份 删除历史文件夹 备库(Standby) 删除归档 引用说明 主库(Primary) $ crontab -l 0 1 ...
随机推荐
- Microsoft解读
微软-这个在软件行业影响着我们这个时代 我们所了解的微软或许只在于windows操作系统和office办公软件.但是我们如果只这样认为,那就大错特错了,微软能成为全球互联网巨头,并不是那么简单.今天我 ...
- Android Metro风格的Launcher开发系列第三篇
前言: 各位小伙伴,又到了每周更新文章了时候了,本来是周日能发出来呢,这不是赶上清明节吗,女王大人发话了,清明节前两天半陪她玩,只留给我周一下午半天时间写博客,哪里有女王哪里就有压迫呀有木有!好了闲话 ...
- 基于Github&Hexo的个人博客搭建过程
大家好,这里是「 从零开始学 Web 系列教程 」,并在下列地址同步更新...... github:https://github.com/Daotin/Web 微信公众号:Web前端之巅 博客园:ht ...
- μC/OS-II 任务的同步与通信 --- 信号量
任务间通信 系统中的多个任务在运行时,经常需要互相无冲突地访问同一个共享资源,或者需要互相支持和依赖,甚至有时还要互相加以必要的限制和制约,才保证任务的顺利运行.因此,操作系统必须具有对任务的运行进行 ...
- Python系列:一、Python概述与环境安装--技术流ken
Python简介 Python是一种计算机程序设计语言.是一种动态的.面向对象的脚本语言,最初被设计用于编写自动化脚本(shell),随着版本的不断更新和语言新功能的添加,越来越多被用于独立的.大型项 ...
- c++中的new、operator new、placement new
一.定义 1.new new是c++中的关键字,,其行为总是一致的.它先调用operator new分配内存,然后调用构造函数初始化那段内存. new 操作符的执行过程:1. 调用operator n ...
- 在Fragment中保存WebView状态
http://www.lucazanini.eu/2013/android/how-to-save-the-state-of-a-webview-inside-a-fragment-of-an-act ...
- C# string数组转int数组
用法 //字符串数组(源数组) string[] sNums = new[] {"1", "2"}; //整型数组(目标数组) int[] iNums; //转 ...
- SVN、CVS、VSS区别
废话不多说,撸起袖子敲黑板 !~~ #首先向大家简要描述一下SVN与CVS.VSS的介绍与对比: 介绍: 三种都是版本控制软件, 多数用于源代码管理1.CVS(Concurrent Version S ...
- Java集合性能分析-疯狂Java讲义
一.各Set实现类的性能分析 HashSet和TreeSet是Set的两个典型实现.HashSet的性能总是比TreeSet好(特别是最常用的添加.查询元素等操作),因为TreeSet需要额外的红黑树 ...