12.2备库rman使用delete删除归档日志报错RMAN-08137: WARNING: archived log not deleted, needed for standby or upstr
Posted lvcha001
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了12.2备库rman使用delete删除归档日志报错RMAN-08137: WARNING: archived log not deleted, needed for standby or upstr相关的知识,希望对你有一定的参考价值。
问题:
客户环境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 .
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 upstr的主要内容,如果未能解决你的问题,请参考以下文章