连接到目标数据库(不使用恢复目录数据库)
$rman target / nocatalog
显示rman配置
RMAN> show all;
报告目标数据库的物理结构
RMAN> report schema;
报告陈旧备份
RMAN> report obsolete;
报告不可恢复的数据文件
RMAN> report unrecoverable;
列出备份信息
RMAN> list backup;
RMAN> list backup of database;
RMAN> list backup of tablespace table_name;
RMAN> list backup of controlfile;
RMAN> list backup of spfile;
RMAN> list backupset id;
校验备份
RMAN> crosscheck backup;
RMAN> crosscheck backup of database;
RMAN> crosscheck backup of tablespace system;
RMAN> crosscheck backup of controlfile;
RMAN> crosscheck backup of spfile;
RMAN> crosscheck backup of archivelog all;
校验没有备份过的归档日志
RMAN>crosscheck archivelog all;
RMAN>delete noprompt expired archivelog all;
刪除所有的Archivelog files
RMAN> delete archivelog all;
強制刪除前一天以前的archivelog files
RMAN> delete force archivelog until time 'sysdate -1';
RMAN> delete noprompt force archivelog until time 'sysdate -2';
刪除所有过期的Archivelog files
RMAN> delete expired archivelog all;
删除备份
RMAN> delete obsolete; -- 删除陈旧备份
RMAN> delete noprompt obsolete;
RMAN> delete expired backup;
--删除所有expired的备份(包括归档日志、控制文件、备份聚)
RMAN> delete expired ;
RMAN> delete backupset id;
RMAN> delete backup; -- 删除所有备份
改变备份集的状态
RMAN> change backupset id unavailable;
改为长期备份
RMAN> change backupset id keep forever logs;
RMAN> change backupset id keep until time 'sysdate+30' logs;
RMAN> change backupset id nokeep;
基于时间:
RMAN>configure retention policy to recovery window of 30 days;
基于冗余数量:
CONFIGURE RETENTION POLICY TO REDUNDANCY n ;
取消备份保留策略:
CONFIGURE RETENTION POLICY TO NONE;
设置归档日志存放在其它位置
set archivelog destination to 'e:\temp';
RMAN常用命令
原创
©著作权归作者所有:来自51CTO博客作者aiguo1999的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:ORA-01123:无法启动联机备份;未启用介质恢复.
下一篇:ORA-00313:open failed for members of log group 1 of thread 1的解决方法
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
RMAN日常维护常用命令
Oracle RMAN日常维护命令
Oracle RMAN日常维护命令