RMAN ---delete obsolete 不能删除 控制文件copy

发布时间:2022-11-11 19:21:30阅读:56次

系统大全为您提供

说明 /tmp/contrlfile /tmp/controlfile.bkp /home/oracle/control01.ctl 已经通过os命令删除了现在的疑问是如何删除这些 obsolete的记录:以下是测试结果:RMAN> report obsolete;RMAN retention policy will be applied to the commandRMAN retention policy is set to redundancy 1Report of obsolete backups and copiesType Key Completion Time Filename/Handle-------------------- ------ ------------------ --------------------Control File Copy 2 22-APR-13 /tmp/contrlfile.Control File Copy 3 22-APR-13 /tmp/controlfile.bkpControl File Copy 4 23-JUL-13 /home/oracle/control01.ctlRMAN> delete obsolete;RMAN retention policy will be applied to the commandRMAN retention policy is set to redundancy 1Deleting the following obsolete backups and copies:Type Key Completion Time Filename/Handle-------------------- ------ ------------------ --------------------Control File Copy 2 22-APR-13 /tmp/contrlfile.Control File Copy 3 22-APR-13 /tmp/controlfile.bkpControl File Copy 4 23-JUL-13 /home/oracle/control01.ctlDo you really want to delete the above objects (enter YES or NO)? yesRMAN-06207: WARNING: 3 objects could not be deleted for DISK channel(s) dueRMAN-06208: to mismatched status. Use CROSSCHECK command to fix statusRMAN-06210: List of Mismatched objectsRMAN-06211: ==========================RMAN-06212: Object Type Filename/HandleRMAN-06213: --------------- ---------------------------------------------------RMAN-06214: Datafile Copy /tmp/contrlfile.RMAN-06214: Datafile Copy /tmp/controlfile.bkpRMAN-06214: Datafile Copy /home/oracle/control01.ctl----根据上面的提示,使用crosscheck 检测RMAN> crosscheck backup of database;specification does not match any backup in the repositoryRMAN> crosscheck backup of controlfile;specification does not match any backup in the repositoryRMAN> delete expired backup;specification does not match any backup in the repositoryRMAN> list backup summary;List of Backups===============Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag------- -- -- - ----------- --------------- ------- ------- ---------- ---40 B F A DISK 19-NOV-13 1 1 NO TAG20131119T072057RMAN>请教下大家如何删除以上的 obsolete 记录!解决方法:RMAN> CROSSCHECK COPY;specification does not match any datafile copy in the repositoryspecification does not match any archived log in the repositoryvalidation failed for control file copycontrol file copy file name=/home/oracle/control01.ctl RECID=4 STAMP=821523959validation failed for control file copycontrol file copy file name=/tmp/controlfile.bkp RECID=3 STAMP=813384451validation failed for control file copycontrol file copy file name=/tmp/contrlfile. RECID=2 STAMP=813384351Crosschecked 3 objectsRMAN> report obsolete;RMAN retention policy will be applied to the commandRMAN retention policy is set to redundancy 1Report of obsolete backups and copiesType Key Completion Time Filename/Handle-------------------- ------ ------------------ --------------------Control File Copy 2 22-APR-13 /tmp/contrlfile.Control File Copy 3 22-APR-13 /tmp/controlfile.bkpControl File Copy 4 23-JUL-13 /home/oracle/control01.ctlRMAN> delete expired copy;specification does not match any datafile copy in the repositoryspecification does not match any archived log in the repositoryList of Control File Copies===========================Key S Completion Time Ckp SCN Ckp Time ------- - --------------- ---------- ---------------4 X 23-JUL-13 2243850 23-JUL-13 Name: /home/oracle/control01.ctl Tag: TAG20130723T0905593 X 22-APR-13 1495438 22-APR-13 Name: /tmp/controlfile.bkp Tag: TAG20130422T0407302 X 22-APR-13 1490032 22-APR-13 Name: /tmp/contrlfile. Tag: TAG20130422T040550Do you really want to delete the above objects (enter YES or NO)? yesdeleted control file copycontrol file copy file name=/home/oracle/control01.ctl RECID=4 STAMP=821523959deleted control file copycontrol file copy file name=/tmp/controlfile.bkp RECID=3 STAMP=813384451deleted control file copycontrol file copy file name=/tmp/contrlfile. RECID=2 STAMP=813384351Deleted 3 EXPIRED objectsRMAN> report expired;RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-00558: error encountered while parsing input commandsRMAN-01009: syntax error: found "expired": expecting one of: "device, need, obsolete, schema, unrecoverable"RMAN-01007: at line 1 column 8 file: standard inputRMAN> report obsolete;RMAN retention policy will be applied to the commandRMAN retention policy is set to redundancy 1no obsolete backups foundRMAN>总结:Crosschecking BackupsThe CROSSCHECK command checks whether RMAN backups and copies in the repository are still readable by RMAN. Assuming that you have configured automatic channels, you can run these commands:RMAN> CROSSCHECK BACKUP; # checks RMAN backups on configured devicesRMAN> CROSSCHECK COPY; # checks RMAN image copies on configured devices这两个命令还是有点区别的,主要还是要认清楚备份的类型。If backups are stored with a media manager and sbt channels are not configured, then you must allocate a maintenance channel before CROSSCHECK and DELETE commands on sbt devices:RMAN> ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;---如果使用磁带库来备份,需要开一个专用的维护通道。

RMAN> CROSSCHECK BACKUP; 

以上就是系统大全给大家介绍的如何使的方法都有一定的了解了吧,好了,如果大家还想了解更多的资讯,那就赶紧点击系统大全官网吧。

本文来自系统大全http://www.win7cn.com/如需转载请注明!推荐:win7纯净版