rman删除旧的归档日志问题

rman: delete [all] input
数据库oracle 11g 全备脚本如下:
rman target /  <
run {
allocate channel t1 type disk; 
allocate channel t2 type disk; 
allocate channel t3 type disk; 
set limit channel t1 kbytes 4194304;
set limit channel t2 kbytes 4194304;
set limit channel t3 kbytes 4194304;
backup 
format '/u01/rman/full_MPdb_%U' 
(database include current controlfile);
backup 
format '/u01/rman/redolog_MPdb_%U'  archivelog all delete  input;
sql ' alter system archive log current';
release channel t1;
release channel t2;
release channel t3;
exit
EOF

以下是11g下的全备
rman target /  <
run {
allocate channel t1 type disk; 
allocate channel t2 type disk; 
set limit channel t1 kbytes 4194304;
set limit channel t2 kbytes 4194304;
backup full tag 'order' as compressed backupset database
include current controlfile
format '/u01/rman/full_MP_%d_%T_%s' 
plus archivelog
format '/u01/rman/redolog_MP_%d_%T_%s' delete all input;
delete noprompt obsolete;
release channel t1;
release channel t2;
exit
EOF

RMAN> show retention policy;

使用目标数据库控制文件替代恢复目录
db_unique_name 为 ORAMP 的数据库的 RMAN 配置参数为:
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;

-----------------------------------------------------------------------------
问题是每次备份完后只删除/u01/app/oracle/flash_recovery_area/ORACLE11/archivelog下的旧的归档日志文件
但是/u01/app/oracle/product/11.1.0/db_1/dbs下的归档日志并没有删除

原因如下:
backup archivelog all delete input 和 backup archivelog all delete all input的区别是什么?
有资料上说的是:
delete input 表示备份结束后删除归档日志
delete all input 表示备份结束后删除所有归档日志目录文件
做了试验,没有删除目录啊........
结论:
当有多个归档目录时 例如:log_archive_dest_2 、log_archive_dest_1

--delete input后 log_archive_dest_2  中的archivelog并没有被删除(只删除log_archive_dest_1中的)

如果delete all input,所有log_archive_dest_n中的备份的archivelog都会被删除~

-----------------------------------------------------------------------------

还有注意的就是如果flash_recovery_area设置太小会出问题
ORA-00257: 归档程序错误。在释放之前仅限于内部连接
检查alert_log日志原来是归档日志占满了FLASH_RECOVERY_AREA 的2G空间。
解决方法1:先手工删除D:\oracle\product\10.2.0\flash_recovery_area里面的
日志,
然后用户用rman进入把归档日志删除
1)命令>rman target/
2)命令>crosscheck archivelog all;
3)命令>delete expired archivelog all;
4)命令>exit
上面第3个命令
delete noprompt  expired archivelog all; 其中noprompt 是不用手工确认.
解决方法2:改变了FLASH_RECOVERY_AREA的大小
修改命令>alter system set db_recovery_file_dest_size=8G scope=both;
查看命令>show parameter db_recovery_file_dest_size

另外一个rman要注意地方,比如手工删除rman的备份文件,但rman认为没有删除,解决方法:
crosscheck backup ;
delete noprompt expired backup ;
这种方法可以解决 删除无效的或手工通过rm删除的问题。

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

上一篇: 'format' 详解
user_pic_default.png
请登录后发表评论 登录
全部评论
<%=items[i].createtime%>

<%=items[i].content%>

<%if(items[i].items.items.length) { %>
<%for(var j=0;j
<%=items[i].items.items[j].createtime%> 回复

<%=items[i].items.items[j].username%>   回复   <%=items[i].items.items[j].tousername%><%=items[i].items.items[j].content%>

<%}%> <%if(items[i].items.total > 5) { %>
还有<%=items[i].items.total-5%>条评论 ) data-count=1 data-flag=true>点击查看
<%}%>
<%}%>
<%}%>

转载于:http://blog.itpub.net/196700/viewspace-750890/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值