Oracle 10g,11g归档文件删除策略

  Oracle 10g 后,RMAN提供了配置归档文件删除策略:    configure archivelog deletion policy。

该策略对应两个值:1、APPLIED ON STANDBY :设置为该值时,当通过附加的 DELETE INPUT 子句删除Standby数据库仍需要的日志时,会提示RMAN-08137错误。不过仍然可以手动地通过 DELETE ARCHIVELOG 方式删除。

                                    2、 NONE :设置为该值时,则不启用归档文件的删除策略。默认情况下就是NONE。

RMAN> configure archivelog deletion policy to applied on standby;

 old RMAN configuration parameters:

CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;

new RMAN configuration parameters:

CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;

new RMAN configuration parameters are successfully stored

RMAN-08591: WARNING: invalid archivelog deletion policy

在网上查了很多中英文资料,都一致说要修改隐藏参数,可以解决RMAN-08591警告:

SQL>alter system set "_log_deletion_policy"=ALL scope=spfile sid='*';
然后关闭重启数据库,就OK了!结果笔者在10g,11g都如法配置后,还是会出现警告。最后再继续查找英文资料,终于找到了解决方案:

SQL> alter system set log_archive_dest_2='service=stdby lgwr async valid_for=(online_logfiles,primary_role) mandatory';
System altered.
SQL> exit
So that made this destination mandatory. You can also see that there are a lot more log_archive_dest_n parameters in 11.2, it’s 32 if memory serves me right.
[oracle@rhel5 ~]$ exit
exit
host command complete

RMAN> configure archivelog deletion policy to applied on standby;
old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters are successfully stored

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页