码迷,mamicode.com
首页 > 数据库 > 详细

12.2备库rman使用delete删除归档日志报错RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

时间:2019-08-07 09:26:05      阅读:380      评论:0      收藏:0      [点我收藏+]

标签:should   box   定时   capture   arc   文件   str   har   database   

问题:

客户环境12.2 dg备库环境,定时清理归档脚本并未正常清理归档日志文件。

观察日志可以发现存在如下信息

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process .

一般情况下,如果在备库环境或者主库环境,配置归档清理测量后,DG环境未应用归档将不允许删除。

本次排查RMAN清理归档策略默认,且无法删除的归档日志在DG视图v$archived_log 中applied列为YES

匹配MOS

RMAN-08137 while Deleting Archived Logs from Standby (文档 ID 2169282.1)

CAUSE

log_archive_dest_2 on standby which points to primary database was deferred :

log_archive_dest_2 <SERVICE_NAME> ASYNC NOAFFIRM valid_for=(online_logfile,primary_role) db_unique_name=<SERVICE_NAME>
log_archive_dest_state_2= DEFER

This is functionality change in Oracle12c with fix of <bug 16082541>:  RMAN DELETES ARCHIVELOGS WHICH HAVE NOT BEEN APPLIED TO A DEFERRED STANDBY

SOLUTION

1.  Enable the destination:

SQL>alter system set log_archive_dest_state_2 = ENABLE;

Once destination 2 is enabled , then Please run the archivelog deletion command on standby from RMAN .

NOTE:  There is no harm in enabling the log_archive_dest_2 on standby , redo will be transported only when standby becomes primary.

2.  If the destination should not be considered, unset the destination rather setting it‘s state to DEFER.  

 

实际情况发现,DG配置远程归档参数,指向主库,且远程归档线程状态为DEFER,按照文档提示,修改为ENABLE后,手工执行归档清理脚本后正常。

 

12.2备库rman使用delete删除归档日志报错RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

标签:should   box   定时   capture   arc   文件   str   har   database   

原文地址:https://www.cnblogs.com/lvcha001/p/11313041.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!