Oracle 10G RAC - 归档参数格式导致归档至ASM时出错的问题

时间:2022-04-08 03:54:37

 10G RAC在ASM中存放归档日志参数正确设置
log_archive_dest_1        string      location=+RECOVERY/JTPROD
在利用vmware workstation进行共享磁盘,当设置log_archive_dets_1为‘+RECOVERY/JTPROD/archfolder’类似格式时,归档时会导致磁盘不一致,归档文件也不能够正常使用,包括crosscheck与backup archivelog all等常用的管理操作。

错误如下alter日志:
SUCCESS: diskgroup ARCH was mounted
archivelog header validation failure for file +ARCH/jtprod/1_13_772105560.dbf
archivelog header validation failure for file +ARCH/jtprod/1_15_772105560.dbf
Mon Jan 09 13:38:29 CST 2012
SUCCESS: diskgroup ARCH was dismounted

调试过程如下
RMAN>backup database plus archivelog;

ORA-19563: archived logheader validation failed for file

RMAN>crosscheck archivelog all;该文件为failed。

RMAN>list expired copy;显示这些归档无效,不能被使用。

RMAN>delete expired coyp;只好将之删除。

解决
当log_archive_dest_1调整为location=+RECOVERY/JTPROD是则不再报错。
SQL>alter system set log_archive_dest_1='location=+RECOVERY/JTPROD' scope=spfile sid='JTPROD1';
SQL>alter system set log_archive_dest_1='location=+RECOVERY/JTPROD' scope=spfile sid='JTPROD2';
log_archive_dest_1scope=both修改后spfile和memory可以立马生效.

 

同时如果还有类似错误需要进行
RMAN> allocate channel for maintenance type disk;
allocated channel: ORA_MAINT_DISK_1
channel ORA_MAINT_DISK_1: sid=133 instance=JTPROD1 devtype=DISK
RMAN> change archivelog all crosscheck;
validation succeeded for archived log
archive log filename=+RECOVERY/jtprod/1_35_772105560.dbf recid=78 stamp=772236831
validation succeeded for archived log
archive log filename=+RECOVERY/jtprod/1_36_772105560.dbf recid=81 stamp=772236893
validation succeeded for archived log
archive log filename=+RECOVERY/jtprod/1_37_772105560.dbf recid=82 stamp=772237064
validation succeeded for archived log
archive log filename=+RECOVERY/jtprod/1_38_772105560.dbf recid=84 stamp=772237096
validation succeeded for archived log
archive log filename=+RECOVERY/jtprod/1_39_772105560.dbf recid=88 stamp=772237236
validation succeeded for archived log
archive log filename=+RECOVERY/jtprod/1_40_772105560.dbf recid=89 stamp=772237681
validation failed for archived log
archive log filename=+RECOVERY/jtprod/2_52_772105560.dbf recid=87 stamp=772237227
validation succeeded for archived log
archive log filename=+RECOVERY/jtprod/2_53_772105560.dbf recid=90 stamp=772237680
Crosschecked 8 objects
RMAN> release channel;

released channel: ORA_MAINT_DISK_1

补充说明
当手工删除了数据库的归档文件后,要执行以下脚本进行同步:
RMAN> allocate channel for maintenance type disk;
RMAN> change archivelog all crosscheck;
RMAN> release channel;
当手工删除了数据库的RMAN备份文件后,要执行以下脚本进行同步:
RMAN> allocate channel for maintenance type disk;
RMAN> crosscheck backup;
RMAN> delete expired backup;
RMAN> release channel;
如果目标数据库物理对象发生了变化,如添加数据文件,应用如下命令同步:
RMAN>resync catalog;