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.
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 vendor.
4:文件权限问题
在root账号下使用SFTP拷贝了备份文件,文件的属主为root用户,而RMAN命令运行在oracle用户下,所以在还原时,
由于权限问题,RMAN认为文件不存在,从而报RMAN-06172错误。
这种情况的判别、验证步骤如下:
1: 找到对应的备份文件
list backup of xxx
2: 使用 ls -lrt 检查文件权限属性。
3: 修改备份文件的属主
chown oracle:oinstall *
https://www.cnblogs.com/kerrycode/p/8668875.html
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
【纯干货】Oracle 19C RU 19.27 发布,如何快速升级和安装?
Lucifer三思而后行
768次阅读
2025-04-18 14:18:38
Oracle RAC 一键安装翻车?手把手教你如何排错!
Lucifer三思而后行
650次阅读
2025-04-15 17:24:06
Oracle数据库一键巡检并生成HTML结果,免费脚本速来下载!
陈举超
576次阅读
2025-04-20 10:07:02
【ORACLE】你以为的真的是你以为的么?--ORA-38104: Columns referenced in the ON Clause cannot be updated
DarkAthena
532次阅读
2025-04-22 00:13:51
【活动】分享你的压箱底干货文档,三篇解锁进阶奖励!
墨天轮编辑部
522次阅读
2025-04-17 17:02:24
【ORACLE】记录一些ORACLE的merge into语句的BUG
DarkAthena
499次阅读
2025-04-22 00:20:37
一页概览:Oracle GoldenGate
甲骨文云技术
484次阅读
2025-04-30 12:17:56
火焰图--分析复杂SQL执行计划的利器
听见风的声音
455次阅读
2025-04-17 09:30:30
3月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
381次阅读
2025-04-15 14:48:05
OR+DBLINK的关联SQL优化思路
布衣
377次阅读
2025-05-05 19:28:36