Quantcast
Channel: Jimmy He – OracleBlog
Viewing all articles
Browse latest Browse all 130

升级到12.1.0.2之后rman无法删除已经归档日志

$
0
0

客户一个数据库,架构是2地3中心,本地有primary和standby,远程还有一个standby。

primary的rman archivelog deletion policy是ship to all standby
同城standby的rman archivelog deletion policy是backup 1 time,备份在同城standby上进行。
远程standby的rman archivelog deletion policy是applied on all standby。

某一天发现FRA区满了,FRA区积累了大量的规定日志,没有被自动删除,手动删除归档日志的时候,也报错:

RMAN-08120:WARNING: archived log not deleted, not yet applied by standby

只有加force参数才能强行删除日志。

这个问题,是因为在12.1.0.2中,删除归档日志的默认行为发生了变化。原来在11g中不考虑defer的路径,在12.1.0.2时如果有defer的路径,则会报错日志没有applied,即使这些日志实际上已经被applied了

This behavior has changed and is related to:

Bug 16082541 RMAN DELETES ARCHIVELOGS WHICH HAVE NOT BEEN APPLIED TO A DEFERRED STANDBY
which was fixed in 12.1.0.2, ( but has changed behaviour in handling of deleting logs)

Changed behaviour:
-> Destinations that are marked DEFERRED (and valid_now=’UNKNOWN’) are considered in in 12.1.0.2 before deleting logs.

客户的这个环境,设置了log_archive_dest_n(这是为了switchover时方便继续做standby):
在primary设置了log_archive_dest_2为远程standby,log_archive_dest_state_2为enable;log_archive_dest_3为同城standby,log_archive_dest_state_3为enable。
在同城standby设置了log_archive_dest_2为primary,log_archive_dest_state_2为defer;log_archive_dest_3为远程standby,log_archive_dest_state_3为defer。
在远程standby设置了log_archive_dest_2为primary,log_archive_dest_state_2为defer;log_archive_dest_3为同城stanby,log_archive_dest_state_3为defer。

这样在switchover的时候,只需将defer的参数改成enable,就可以继续做dataguard。

可是,就是因为这样的参数设置,加上12.1.0.2的删除日志规则的改变,造成了在远程standby上,由于规则是applied on all standby,且设置成了defer,所以就无法删除。

在远程standby上检查
SQL> SELECT * from v$archive_dest where (valid_now = 'UNKNOWN' AND status = 'DEFERRED') ;
返回有2行记录,即primary和本地standby。

目前可以参考的解决方案:
1. 不改log_archive_dest_state_n,设置log_archive_dest_n=''
2. 不取消log_archive_dest_state_n,修改log_archive_dest_n为enable
3. alter system set "_deferred_log_dest_is_valid"=false
4. archivelog deletion policy从applied on all standby改成applied on standby

参考:Doc ID 2022958.1


Viewing all articles
Browse latest Browse all 130

Trending Articles


EASY COME, EASY GO


UPDATE SC IDOL: TWO BECOME ONE


Pokemon para colorear


Sapos para colorear


Smile Quotes


Patama lines and Tagalog Quotes Pinoy Sayings


Tropa Quotes


“Mali man na ikaw ay ibigin ko, akoy iibig padin sayo”


RE: Mutton Pies (frankie241)


Vimeo 10.7.0 by Vimeo.com, Inc.


FORECLOSURE OF REAL ESTATE MORTGAGE


HOY PANGIT, MAGBAYAD KA!


Girasoles para colorear


tagalog love Quotes – Tiwala Quotes


The business quotes | Inspirational and Motivational Quotes for you


Long Distance Relationship Tagalog Love Quotes


5 Tagalog Relationship Rules


Re:Mutton Pies (lleechef)


Ka longiing longsem kaba skhem bad kaba khlain ka pynlong kein ia ka...


Vimeo 10.7.1 by Vimeo.com, Inc.