配置rman来自动删除应用过的归档日志

发布时间:2020-08-08 18:09:25 作者:pxbibm
来源:ITPUB博客 阅读:206

Configure Rman to Purge Application standby logs.

Posted on   March 26, 2011   by   Gary

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’ /


推荐阅读:
  1. DataGuard 备库归档日志自动删除配置
  2. RMAN删除归档日志不释放问题

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

rman 删除 归档

上一篇:linux7上安装RAC的问题

下一篇:学习这篇文章,搭建Sybase数据库不再是难题!

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》