Oracle11g删除归档日志

更新时间:2023-06-25 17:41:50 阅读: 评论:0

Oracle11g删除归档⽇志
⼯作环境ORACLE 11g 归档⽇志满了,⼿动删除出现 ora 异常。
注:⼯作环境是linux redhat 5
执⾏命令如下:
1. 进⼊rman
2. connect target /
3. crosscheck archivelog all;
考试检讨4. delete expired archivelog all;
执⾏到最后⼀步出现异常
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
官⽅解释:
RMAN-08137 When deleting archivelogs even when Streams CAPTURE does not require them [ID 1079953.1]
RMAN is unable to delete archive logs from databa even though they are not needed by CAPTURE process anymore.如果想强制删除,执⾏命令
4. delete force expired archivelog all;
RMAN常⽤命令
1.RMAN> connect target / nocatalog
连接到⽬标数据库(不使⽤恢复⽬录数据库)
2.RMAN> show all;
显⽰rman配置
3.RMAN> report schema;
报告⽬标数据库的物理结构
4.RMAN> report obsolete;
报告陈旧备份
5.RMAN> report unrecoverable;
报告不可恢复的数据⽂件
6.RMAN> list backup;
RMAN> list backup of databa;
 RMAN> list backup of tablespace table_name;
RMAN> list backup of controlfile;
消防员英雄 RMAN> list backup of spfile;
 RMAN> list backupt id;
列出备份信息
廉耻
7.RMAN> crosscheck backup;
 RMAN> crosscheck backup of databa;
 RMAN> crosscheck backup of tablespace system;
 RMAN> crosscheck backup of controlfile;
 RMAN> crosscheck backup of spfile;
 RMAN> crosscheck backup of archivelog all;
校验备份
8.RMAN>crosscheck archivelog all;
 RMAN>delete noprompt expired archivelog all;
校验没有备份过的归档⽇志
令誉8.RMAN> delete archivelog all; 
刪除所有的Archivelog files
9.RMAN> delete force archivelog until time 'sysdate -1';
 RMAN> delete noprompt  force archivelog until time 'sysdate -2';強制刪除昨天以前的archivelog files
index函数10.RMAN> delete expired archivelog all;
刪除所有过期的Archivelog files
11.RMAN> delete obsolete; -- 删除陈旧备份
 RMAN> delete noprompt obsolete;
删除备份单色壁纸
12.RMAN> delete expired backup;
删除所有expired的备份(包括归档⽇志、控制⽂件、备份聚)
13.RMAN> delete backup;
删除所有备份
14.RMAN> change backupt id unavailable;
岳飞满江红全文 RMAN> change backupt id keep forever logs;
 RMAN> change backupt id keep until time 'sysdate+30' logs;
寻找商机
 RMAN> change backupt id nokeep;
改为长期备份
15.RMAN> configure retention policy to recovery window of 30 days;
改为基于时间的备份
16.RMAN> configure retention policy to redundancy  n ;
改为基于冗余数量的备份
17.RMAN> configure retention policy to none;
取消备份保留策略:
18.RMAN> t archivelog destination to 'e:\temp';
设置归档⽇志存放在其它位置
不过切记,ORACLE归档⽇志对于ORACLE的数据恢复和备份⾮常重要,不到万不得已不要删除归档⽇志。

本文发布于:2023-06-25 17:41:50,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1054580.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:备份   归档   删除   数据库   报告   恢复   改为   存放
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图