Oracle RMAN常用命令小结

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:138

RMAN命令小结
  ===================  连接到目标数据库(不用恢复目录数据库)   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> delete obsolete; -- 删除陈旧备份
  RMAN> delete expired backup;
  RMAN> delete backupset id;
  RMAN> delete backup; -- 删除所有备份

  =========================  改变备份集的状态  RMAN> change backupset id unavailable; -- available  改为长期备份  RMAN> change backupset id keep forever logs;
  RMAN> change backupset id keep until time'sysdate+60' logs;
  RMAN> change backupset id nokeep;run { allocatechannel t1 type 'sbt_tape' parms'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; allocatechannel t2 type 'sbt_tape' parms'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; delete expiredbackup; release channelt1; release channelt2; }

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】