oracle rman 06056,RMAN-06169: could not read file header during RMAN duplicate database

在尝试使用RMAN复制数据库时,遇到了由于离线数据文件和丢失的归档导致的问题。错误代码6169表明无法读取数据文件头。官方建议的解决方法包括:1) 使用RMAN备份时跳过不可访问的数据文件;2) 移动或删除包含离线数据文件的表空间,或重新创建数据文件。不推荐的方法包括直接修改文件头信息或尝试恢复。建议根据具体情况选择合适方案。
摘要由CSDN通过智能技术生成

近期有个友商在做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微信扫一扫,打赏作者吧~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值