ITPub博客

首页 > 数据库 > Oracle > RMAN - report命令小结

RMAN - report命令小结

原创 Oracle 作者:呱呱牛 时间:2016-07-20 20:04:08 0 删除 编辑
RMAN使用report命令来检查备份和恢复策略是否满足数据库恢复的要求,report命令主要有几个用法
- - report need backup     根据备份策略 报告需要backup的数据文件
- - report unrecoverable   报告因数据已更改需要backup的数据文件

- - report obsolete       报告过期备份文件

点击(此处)折叠或打开

  1. RMAN> report need backup;

  2. RMAN retention policy will be applied to the command
  3. RMAN retention policy is set to redundancy 1
  4. Report of files with less than 1 redundant backups
  5. File #bkps Name
  6. ---- ----- -----------------------------------------------------
  7. 1 0 +DATA/mhxy/datafile/system.256.908824039

  8. RMAN> report unrecoverable;

  9. Report of files that need backup due to unrecoverable operations
  10. File Type of Backup Required Name
  11. ---- ----------------------- -----------------------------------
  12. 5 full +DATA/mhxy/datafile/example.264.908824295

  13. RMAN> report obsolete;


    RMAN retention policy will be applied to the command
    RMAN retention policy is set to redundancy 1
    no obsolete backups found


    RMAN> 
另外的情况是,report命令可以指定不同的条件,比如冗余的分数redundancy n、恢复窗口的时间 recovery window of n days、归档日志时间days n以及增量备份 incremental n

点击(此处)折叠或打开

  1. REPORT NEED BACKUP RECOVERY WINDOW OFn DAYS
  2.     Displays objects requiring backup to satisfy a recovery window-based retention policy.
  3. REPORT NEED BACKUP REDUNDANCYn
  4.     Displays objects requiring backup to satisfy a redundancy-based retention policy.
  5. REPORT NEED BACKUP DAYS = n
  6.     Displays files that require more than n days
  7. REPORT NEED BACKUP INCREMENTAL n
      
    Displays files that require application of more than n incremental backups for recovery.


对数据文件和表空间使用report need backup命令

点击(此处)折叠或打开

  1. RMAN> REPORT NEED BACKUP RECOVERY WINDOW OF 2 DAYS DATABASE SKIP TABLESPACE MOJO01;
  2. RMAN> REPORT NEED BACKUP REDUNDANCY 2 DATAFILE 1;
  3. RMAN> REPORT NEED BACKUP TABLESPACE TBS_3MOJO01; # uses configured retention policy
  4. RMAN> REPORT NEED BACKUP INCREMENTAL 2; # checks entire database

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

请登录后发表评论 登录
全部评论

注册时间:2014-05-29

  • 博文量
    96
  • 访问量
    286799