RMANdeleteobsolete不能删除控制文件copy
来源:达缇美食
系统大全为您提供 说明/tmp/contrlfile /tmp/controlfile.bkp /home/oracle/control01.ctl 已经通过os命令删除了 现在的疑问是如何删除这些obsolete的记录: 以下是测试结果: RMAN>reportobsolete; RMANretentionpolicywillbeappliedtothecommand RMANretentionpolicyissettoredundancy1 Reportofobsoletebackupsandcopies Type Key CompletionTime Filename/Handle ---------------------------------------------------------------- ControlFilecopy 2 22-APR-13 /tmp/contrlfile. ControlFilecopy 3 22-APR-13 /tmp/controlfile.bkp ControlFilecopy 4 23-JUL-13 /home/oracle/control01.ctl RMAN> deleteobsolete; RMANretentionpolicywillbeappliedtothecommand RMANretentionpolicyissettoredundancy1 Deletingthefollowingobsoletebackupsandcopies: Type Key CompletionTime Filename/Handle ---------------------------------------------------------------- ControlFilecopy 2 22-APR-13 /tmp/contrlfile. ControlFilecopy 3 22-APR-13 /tmp/controlfile.bkp ControlFilecopy 4 23-JUL-13 /home/oracle/control01.ctl Doyoureallywanttodeletetheaboveobjects(enterYESorNO)?yes RMAN-06207:WARNING:3objectsCouldnotbedeletedfordisKchannel(s)due RMAN-06208: tomismatchedstatus. UseCROSSCHECKcommandtofixstatus RMAN-06210:ListofMismatchedobjects RMAN-06211:========================== RMAN-06212: ObjectType Filename/Handle RMAN-06213:------------------------------------------------------------------ RMAN-06214:Datafilecopy /tmp/contrlfile. RMAN-06214:Datafilecopy /tmp/controlfile.bkp RMAN-06214:Datafilecopy /home/oracle/control01.ctl ----根据上面的提示,使用crosscheck检测 RMAN>crosscheckbackupofdatabase; specificationdoesnotmatchanybackupintherepository RMAN> crosscheckbackupofcontrolfile; specificationdoesnotmatchanybackupintherepository RMAN>deleteexpiredbackup; specificationdoesnotmatchanybackupintherepository RMAN>listbackupsummary; ListofBackups =============== Key TYLVSDeviceTypeCompletionTime#Pieces#copiesCompressedTag ----------------------------------------------------------------- 40 B F AdisK 19-NOV-13 1 1 NO TAG20131119T072057 RMAN> 请教下大家如何删除以上的obsolete记录! 解决方法: RMAN>CROSSCHECKcopY; specificationdoesnotmatchanydatafilecopyintherepository specificationdoesnotmatchanyarchivedlogintherepository validationFailedforcontrolfilecopy controlfilecopyfilename=/home/oracle/control01.ctlRECID=4STAMP=821523959 validationFailedforcontrolfilecopy controlfilecopyfilename=/tmp/controlfile.bkpRECID=3STAMP=813384451 validationFailedforcontrolfilecopy controlfilecopyfilename=/tmp/contrlfile.RECID=2STAMP=813384351 Crosschecked3objects RMAN>reportobsolete; RMANretentionpolicywillbeappliedtothecommand RMANretentionpolicyissettoredundancy1 Reportofobsoletebackupsandcopies Type Key CompletionTime Filename/Handle ---------------------------------------------------------------- ControlFilecopy 2 22-APR-13 /tmp/contrlfile. ControlFilecopy 3 22-APR-13 /tmp/controlfile.bkp ControlFilecopy 4 23-JUL-13 /home/oracle/control01.ctl RMAN>deleteexpiredcopy; specificationdoesnotmatchanydatafilecopyintherepository specificationdoesnotmatchanyarchivedlogintherepository ListofControlFilecopies =========================== Key SCompletionTimeCkpSCN CkpTime ------------------------------------------------ 4 X23-JUL-13 2243850 23-JUL-13 Name:/home/oracle/control01.ctl Tag:TAG20130723T090559 3 X22-APR-13 1495438 22-APR-13 Name:/tmp/controlfile.bkp Tag:TAG20130422T040730 2 X22-APR-13 1490032 22-APR-13 Name:/tmp/contrlfile. Tag:TAG20130422T040550 Doyoureallywanttodeletetheaboveobjects(enterYESorNO)?yes deletedcontrolfilecopy controlfilecopyfilename=/home/oracle/control01.ctlRECID=4STAMP=821523959 deletedcontrolfilecopy controlfilecopyfilename=/tmp/controlfile.bkpRECID=3STAMP=813384451 deletedcontrolfilecopy controlfilecopyfilename=/tmp/contrlfile.RECID=2STAMP=813384351 Deleted3EXPIREDobjects RMAN>reportexpired; RMAN-00571:=========================================================== RMAN-00569:===============ERRORMESSAGESTACKFOLLOWS=============== RMAN-00571:=========================================================== RMAN-00558:errorencounteredwhileparsinginputcommands RMAN-01009:Syntaxerror:found"expired":expectingoneof:"device,need,obsolete,schema,unrecoverable" RMAN-01007:atline1column8file:standardinput RMAN>reportobsolete; RMANretentionpolicywillbeappliedtothecommand RMANretentionpolicyissettoredundancy1 noobsoletebackupsfound RMAN> 总结: CrosscheckingBackups TheCROSSCHECKcommandcheckswhetherRMANbackupsandcopiesintherepositoryarestillreadablebyRMAN.Assumingthatyouhaveconfiguredautomaticchannels,youcanrunthesecommands: RMAN>CROSSCHECKBACKUP;#checksRMANbackupsonconfigureddevices RMAN>CROSSCHECKcopY;#checksRMANimagecopiesonconfigureddevices 这两个命令还是有点区别的,主要还是要认清楚备份的类型。 Ifbackupsarestoredwithamediamanagerandsbtchannelsarenotconfigured,thenyoumustallocateamaintenancechannelbeforeCROSSCHECKandDELETEcommandsonsbtdevices: RMAN>ALLOCATECHANNELFORMAINTENANCEDEVICETYPEsbt;---如果使用磁带库来备份,需要开一个专用的维护通道。 RMAN>CROSSCHECKBACKUP; 以上就是系统大全给大家介绍的如何使的方法都有一定的了解了吧,好了,如果大家还想了解更多的资讯,那就赶紧点击系统大全官网吧。 本文来自系统大全http:///如需转载请注明!推荐:win7纯净版
显示全文