晚上在做oracle实验的时候,一开始就把前几天存放RMAN备份集目录下的文件给删掉了。结果我到RMAN 下,想把之前做的一些备份给删除,结果,任我怎么执行

RMAN>delete backup;

然后再才执行 ,list backup,里面数据还在,经过仔细查看,原来列出的备份文件,刚刚被我删掉了,可是RMAN 里的数据却没有更新。想想应该是要让rman的数据也要更新才行的,可是要怎么去更新RMAN的数据信息,只好求助GOOGLE,还别说真让我给找到了。

那就是在RMAN下执行

RMAN> crosscheck backup; 执行备份的交叉检查。

再接着执行

RMAN>delete expired backup; 删除过期的备份

再次执行查看备份情况,

RMAN> list backup;

这下发现,什么也没有,总算搞定刚刚小小的困惑;

下面把官方原文摘抄:

8.3.2 Deleting Expired RMAN Backups after CROSSCHECK

When the CROSSCHECK command is used to determine whether backups recorded in the repository still exist on disk or tape, if RMAN cannot locate the backups, then it updates their records in the RMAN repository to EXPIRED status. You can then use the DELETE EXPIRED command to remove records of expired backups from the RMAN repository. If the expired files still exist, then the DELETE EXPIRED command terminates with an error.

To delete expired repository records:

  1. If you have not performed a crosscheck recently, then issue a CROSSCHECK command. For example, issue:CROSSCHECK BACKUP; # checks backup sets and copies on configured channels

  2. Delete the expired backups. For example, issue:DELETE EXPIRED BACKUP;

Note:

The DELETE EXPIRED command issues warnings if any objects marked as EXPIRED actually exist. In rare cases, the repository can mark an object as EXPIRED even though the object exists. For example, a directory containing an object is corrupted at the time of the crosscheck, but is later repaired, or the media manager was not configured properly and reported some backups as not existing when they really existed.

 

哈哈,看来以后是要多读oracle 的官方文档才行啊,不然人家说得这么明白的事,我都不知道,不是浪费人家的心血嘛!