广告
返回顶部
首页 > 资讯 > 数据库 >配置rman来自动删除应用过的归档日志
  • 944
分享到

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

2024-04-02 19:04:59 944人浏览 泡泡鱼
摘要

Configure Rman to Purge Application standby logs. Posted on   March 26, 2011   by

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


您可能感兴趣的文档:

--结束END--

本文标题: 配置rman来自动删除应用过的归档日志

本文链接: https://www.lsjlt.com/news/46697.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • 配置rman来自动删除应用过的归档日志
    Configure Rman to Purge Application standby logs. Posted on   March 26, 2011   by...
    99+
    2022-10-18
  • DataGuard 备库归档日志自动删除配置
    1. 如果没有备份机制,想要实现备库归档自动删除,就需要使用快速恢复区(FRA)  检查当前备库归档的存放位置:  SQL> show parameter log_arc...
    99+
    2022-10-18
  • 如何使用RMAN删除过期归档日志
    这篇文章主要介绍“如何使用RMAN删除过期归档日志”,在日常操作中,相信很多人在如何使用RMAN删除过期归档日志问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”如何使用RMAN...
    99+
    2022-10-18
  • 如何实现自动删除归档日志的脚本
    这篇文章主要介绍如何实现自动删除归档日志的脚本,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!自动删除归档日志的脚本(尤其是dataguard环境)已有 236 次阅读2011-12-16 21:02 |个人分类:or...
    99+
    2023-06-04
  • dg如何实现删除备库已经应用的归档日志脚本
    这篇文章主要介绍了dg如何实现删除备库已经应用的归档日志脚本,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。 #!/bin/bash #b...
    99+
    2022-10-18
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作