RMAN-08137

来源:互联网 发布:c语言char 编辑:程序博客网 时间:2024/06/14 20:01
 

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


目录(?)[+]

突然接到告警短信,备份归档的目录使用率超过90%了,执行脚本删除2天前的归档,结果报错了:


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


这才知道,前天备库挂了,将主库上的log_archive_dest_state_2 参数设置为defer 了。下面是MOS上的资料:

CAUSE

If we defer an Archive Destination to a Standby Database, the Primary Database will still consider the Standby Database as existing but temporary unavailable eg. for Maintenance. This can happen if you stop Log Transport Services from the Data Guard Broker or manually defer the State for the Archive Destination.

SOLUTION

As long as the Archive Destination (log_archive_dest_n) is still set, we consider the Standby Database as still existing and preserve the ArchiveLogs on the Primary Database to perform Gap Resolution when the Archive Destination is valid again.
There are Situations when this is not wanted, eg. the Standby Database was activated or removed but you still keep the Archive Destination because you want to rebuild the Standby Database later again. In this Case you can set the hidden Parameter "_deferred_log_dest_is_valid" to FALSE (default TRUE) which will consider deferred Archive Destinations as completely unavailable and will not preserve ArchiveLogs for those Destinations any more. It is a dynamic Parameter and can be set this Way:

SQL> alter system set "_deferred_log_dest_is_valid" = FALSE scope=both;


另一种解决方法:加force

delete force noprompt archivelog until time 'sysdate-2' ;

原创粉丝点击