网络编程
位置:首页>> 网络编程>> 数据库>> Oracle故障处理Rman-06207&Rman-06214的方法

Oracle故障处理Rman-06207&Rman-06214的方法

作者:远离我  发布时间:2023-07-08 01:26:29 

标签:rman-06207,rman-06214,oracle

1、在给客户系统巡检时通过rman维护日志发现有rman维护日志报错:

RMAN-06207: WARNING: 3 objects could not be deleted for DISK channel(s) due

RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status

RMAN-06210: List of Mismatched objects

RMAN-06211: ==========================

RMAN-06212:   Object Type   Filename/Handle

RMAN-06213: --------------- ---------------------------------------------------

RMAN-06214: Datafile Copy   D:\ORADATA\SYSTEM01.DBF

RMAN-06214: Datafile Copy   D:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNCFDB.ORA

RMAN-06214: Datafile Copy   /u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_db1.f

2、进入rman视图模式,进行交叉校验备份信息,未发现异常,如下:

[root@db1 rman]# su - oracle
[oracle@db1 ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Tue Nov 1 13:38:38 2022
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
cconnected to target database: HISDB (DBID=1732211111)
RMAN> crosscheck backup;
backup piece handle=/dbbak/rman/ctl_DB_20221031_16719_1 RECID=14479 STAMP=1119556333
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/dbbak/rman/DB_ag1bm4nl_1_1.spfile RECID=14480 STAMP=1119556334
Crosschecked 2 objects

3、根据提示路径发现系统近期是从windows环境迁移至linux环境的,在迁移之前没有对控制文件记录的信息进行维护导致,通过crosscheck copy命令进行校验检查,发现存在检查失败的内容,如下:

RMAN> crosscheck copy;
validation failed for datafile copy
datafile copy file name=D:\ORADATA\SYSTEM01.DBF RECID=1 STAMP=1108073097
validation failed for control file copy
control file copy file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_db1.f RECID=18 STAMP=1108406674
validation failed for control file copy
control file copy file name=D:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNCFDB.ORA RECID=10 STAMP=1108209845
Crosschecked 3 objects

4、使用report obsolete命令报告过时的对象,如下:

RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Datafile Copy        1   22-JUN-2022 22:04:57 D:\ORADATA\SYSTEM01.DBF
Control File Copy 10 24-JUN-2022 12:04:05 D:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNCFDB.ora
Control File Copy  18 26-JUN-2022 18:44:34 /u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_hisdb1.f

5、使用delete obsolete命令删除存在问题的对象,如下:

RMAN> delete obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Datafile Copy        1      22-JUN-2022 22:04:57 D:\ORADATA\SYSTEM01.DBF
Control File Copy     10     24-JUN-2022 12:04:05 D:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNCFDB.ORA
Control File Copy     18     26-JUN-2022 18:44:34 /u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_db1.f
Do you really want to delete the above objects (enter YES or NO)? yes
deleted datafile copy
datafile copy file name=D:\ORADATA\SYSTEM01.DBF RECID=1 STAMP=1108073097
deleted control file copy
control file copy file name=D:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNCFDB.ORA RECID=10 STAMP=1108209845

6、至此,rman在维护数据库的时候不在出现Rman-06207&Rman-06214报错。

来源:https://juejin.cn/post/7161113266821791758

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com