热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

oraclerman06056,RMAN06169:couldnotreadfileheaderduringRMANduplicatedatabase

近期有个友商在做RMANduplidatedatabase搭建DG时,因为primarydb上有offline的datafile,并且归档已经丢失&#x

近期有个友商在做RMAN duplidate database搭建DG时,因为primary db上有offline 的datafile ,并且归档已经丢失,无法再做recover ,online datafile的操作,操作系统或存储上的datafile已经不存在,duplicate时报错如下。

Starting backup at 19-NOV-20

RMAN-06169: could not read file header for datafile 357 error reason 4

released channel: prmy1

released channel: prmy2

released channel: prmy3

released channel: prmy4

released channel: stby

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of Duplicate Db command at 11/19/2020 17:15:03

RMAN-05501: aborting duplication of target database

RMAN-03015: error occurred in stored script Memory Script

RMAN-06056: could not access datafile 357

发现主库上有offline状态的datafile: file#=357 name=+DATA/tyjc/datafile/service_main_dat.256.862604801

[oracle@oel7db1 ~]$ oerr rman 6169

6169, 3, "could not read file header for datafile %(1)s error reason %(2)s"

// *Cause: The specified data file could not be accessed. The reason

// codes are:

// 1 - file name is MISSINGxx in the control file

// 2 - file is offline

// 3 - file is not verified

// 4 - DBWR could not find the file

// 5 - unable to open file

// 6 - I/O error during read

// 7 - file header is corrupt

// 8 - file is not a data file

// 9 - file does not belong to this database

// 10 - file number is incorrect

// 12 - wrong file version

// 15 - control file is not current

// *Action: If the error can be corrected, do so and retry the operation.

// The SKIP option can be used to ignore this error during a backup.

Oracle官方支持的方法1是rman 备份指定skip,Try this command to SKIP the offline and corrupted datafiles:

BACKUP DATABASE

SKIP INACCESSIBLE

SKIP OFFLINE;

SKIP INACCESSIBLE: Inaccessible datafiles. A datafile is only considered inaccessible if it cannot be read. Some offline datafiles can still be read because they exist on disk. Others have been deleted or moved and so cannot be read, making them inaccessible.

SKIP OFFLINE: skipping Offline datafiles;

rman生成备份集的方法可行,但是duplicate database中没有skip INACCESSIBLE, 只有skip readonly 和skip tablespace:

DUPLICATE Options

Explanation

SKIP READONLY

Excludes the data files of read-only tablespaces from the duplicate database.

SKIP TABLESPACE 'tablespace_name ', ...

Excludes the specified tablespaces from the duplicate database. You cannot exclude the SYSTEM and SYSAUX tablespaces, tablespaces with SYS objects, undo tablespaces, tablespaces with undo segments, tablespaces with materialized views, or tablespaces in such a way that the duplicated tablespaces are not self-contained.

支持的方法2, 把该表空间(包含offline datafile)的对象move到其它表空间, drop tablespace xxx including datafile and contents,或duplicate skip tablespace。

或者

alter database create datafile ”; — 创建出OS或存储已不存在的物理数据文件,但还是offline的。

官方不支持的方法:

1,alter database create datafile ”;

2,bbed 修改checkpoint scn信息;

3,recover datafile;

4,online datafile;

5, drop datafile;

打赏

8732971891f4ba05583674ca6b8145ac.png微信扫一扫,打赏作者吧~



推荐阅读
  • Linux重启网络命令实例及关机和重启示例教程
    本文介绍了Linux系统中重启网络命令的实例,以及使用不同方式关机和重启系统的示例教程。包括使用图形界面和控制台访问系统的方法,以及使用shutdown命令进行系统关机和重启的句法和用法。 ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
  • Go Cobra命令行工具入门教程
    本文介绍了Go语言实现的命令行工具Cobra的基本概念、安装方法和入门实践。Cobra被广泛应用于各种项目中,如Kubernetes、Hugo和Github CLI等。通过使用Cobra,我们可以快速创建命令行工具,适用于写测试脚本和各种服务的Admin CLI。文章还通过一个简单的demo演示了Cobra的使用方法。 ... [详细]
  • 在Docker中,将主机目录挂载到容器中作为volume使用时,常常会遇到文件权限问题。这是因为容器内外的UID不同所导致的。本文介绍了解决这个问题的方法,包括使用gosu和suexec工具以及在Dockerfile中配置volume的权限。通过这些方法,可以避免在使用Docker时出现无写权限的情况。 ... [详细]
  • Iamtryingtomakeaclassthatwillreadatextfileofnamesintoanarray,thenreturnthatarra ... [详细]
  • 本文介绍了使用kotlin实现动画效果的方法,包括上下移动、放大缩小、旋转等功能。通过代码示例演示了如何使用ObjectAnimator和AnimatorSet来实现动画效果,并提供了实现抖动效果的代码。同时还介绍了如何使用translationY和translationX来实现上下和左右移动的效果。最后还提供了一个anim_small.xml文件的代码示例,可以用来实现放大缩小的效果。 ... [详细]
  • Commit1ced2a7433ea8937a1b260ea65d708f32ca7c95eintroduceda+Clonetraitboundtom ... [详细]
  • android listview OnItemClickListener失效原因
    最近在做listview时发现OnItemClickListener失效的问题,经过查找发现是因为button的原因。不仅listitem中存在button会影响OnItemClickListener事件的失效,还会导致单击后listview每个item的背景改变,使得item中的所有有关焦点的事件都失效。本文给出了一个范例来说明这种情况,并提供了解决方法。 ... [详细]
  • Python如何调用类里面的方法
    本文介绍了在Python中调用同一个类中的方法需要加上self参数,并且规范写法要求每个函数的第一个参数都为self。同时还介绍了如何调用另一个类中的方法。详细内容请阅读剩余部分。 ... [详细]
  • 本文讨论了一个关于cuowu类的问题,作者在使用cuowu类时遇到了错误提示和使用AdjustmentListener的问题。文章提供了16个解决方案,并给出了两个可能导致错误的原因。 ... [详细]
  • XML介绍与使用的概述及标签规则
    本文介绍了XML的基本概念和用途,包括XML的可扩展性和标签的自定义特性。同时还详细解释了XML标签的规则,包括标签的尖括号和合法标识符的组成,标签必须成对出现的原则以及特殊标签的使用方法。通过本文的阅读,读者可以对XML的基本知识有一个全面的了解。 ... [详细]
  • 本文介绍了三种方法来实现在Win7系统中显示桌面的快捷方式,包括使用任务栏快速启动栏、运行命令和自己创建快捷方式的方法。具体操作步骤详细说明,并提供了保存图标的路径,方便以后使用。 ... [详细]
  • 本文介绍了Android 7的学习笔记总结,包括最新的移动架构视频、大厂安卓面试真题和项目实战源码讲义。同时还分享了开源的完整内容,并提醒读者在使用FileProvider适配时要注意不同模块的AndroidManfiest.xml中配置的xml文件名必须不同,否则会出现问题。 ... [详细]
  • MyBatis多表查询与动态SQL使用
    本文介绍了MyBatis多表查询与动态SQL的使用方法,包括一对一查询和一对多查询。同时还介绍了动态SQL的使用,包括if标签、trim标签、where标签、set标签和foreach标签的用法。文章还提供了相关的配置信息和示例代码。 ... [详细]
  • IjustinheritedsomewebpageswhichusesMooTools.IneverusedMooTools.NowIneedtoaddsomef ... [详细]
author-avatar
DilWilling
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有