oracle dataguard 自动删除归档日志

Configure Rman to Purge Application standby logs.

Configure RMAN to purge archivelogs after Application on standby.

Applying to EE Version 10.2.0.1 – 11.2.0.1, and 10.2 to 11.2, We need RMAN to automatically purge archivelogs from the FRA once they are applied to the standby database.

With dataguard, and archives in the FRA, they will be purged if they have been applied on the standby and they are no longer required when there is space pressure on the FRA on the primary database.
Here’s the important part, before 11g, if not using archivelog destinations which are mandatory, then the database must be restarted after setting the following parameter:
1) prior to 11g, if not using mandatory archivelog destinations, the database (primary and standby) must be restarted with the following parameter:
SQL> alter system set “_log_deletion_policy”=’ALL’ scope=spfile;
Then we can configure the parameter as normal.
2) configure the following parameter in RMAN on both the primary and standby databases:
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
3) the archivelog must have been applied to the standby
4) the archivelogmust beobsolete per the current RMAN retention policy.
To list the obsolete objects, run the following query:
RMAN> SHOW RETENTION POLICY RMAN> REPORT OBSOLETE;
5) there is space pressure in the FRA
Again, point 5, there has to be space pressure in the FRA before the policy kicks in. Therefore setting any normal local destination to use this will fail. In my experience the rman delete command complained that the logs were still required.
Another interesting note, the database’s have to be backed up for this policy to take place. Only performing backups on the standby will leave the primary in a state where all logs are required (obviously) since condition 4 will not be met, therefore no automatic purging will take place.
eg: the following query will identify all archivelogs applied to the standby:
select a.thread#, a.sequence#, a.applied from v$archived_log a, v$database d where a.activation# = d.activation# and a.applied=’YES’ /

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/90618/viewspace-703330/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/90618/viewspace-703330/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值