Recovery Manager Maintenance Tasks.docx

上传人:b****7 文档编号:11078787 上传时间:2023-02-24 格式:DOCX 页数:28 大小:29.95KB
下载 相关 举报
Recovery Manager Maintenance Tasks.docx_第1页
第1页 / 共28页
Recovery Manager Maintenance Tasks.docx_第2页
第2页 / 共28页
Recovery Manager Maintenance Tasks.docx_第3页
第3页 / 共28页
Recovery Manager Maintenance Tasks.docx_第4页
第4页 / 共28页
Recovery Manager Maintenance Tasks.docx_第5页
第5页 / 共28页
点击查看更多>>
下载资源
资源描述

Recovery Manager Maintenance Tasks.docx

《Recovery Manager Maintenance Tasks.docx》由会员分享,可在线阅读,更多相关《Recovery Manager Maintenance Tasks.docx(28页珍藏版)》请在冰豆网上搜索。

Recovery Manager Maintenance Tasks.docx

RecoveryManagerMaintenanceTasks

RecoveryManagerMaintenanceTasks

ThischapterdescribeshowtomanagetheRMANrepositoryandsomemaintenancetasksrelatedtotheflashrecoveryarea.

Thischaptercontainsthesetopics:

∙ManagingtheRMANRepositoryWithoutaRecoveryCatalog

∙CrosscheckingBackups

∙DeletingBackups

∙DeletingaDatabasewithRMAN

∙CrosscheckingandDeletingonMultipleRMANChannels

∙ChangingtheStatusofaBackupRecord

∙CatalogingArchivedLogsandUser-ManagedCopies

∙UncatalogingRMANRecords

∙FlashRecoveryAreaMaintenance

SeeAlso:

OracleDatabaseBackupandRecoveryAdvancedUser'sGuideformorein-depthinformationaboutmanagingtheRMANrepositorywhenusingarecoverycatalog

ManagingtheRMANRepositoryWithoutaRecoveryCatalog

TheauthoritativeRMANrepositoryisalwaysstoredinthedatabasecontrolfile.Therepositorycontentscanalsobestoredinarecoverycatalogdatabase,asanadjuncttotheinformationstoredinthecontrolfile.

WhileRMANisdesignedtoworkwithoutarecoverycatalog,ifyouchoosenottousearecoverycatalog,youmustperformsomeadditionaladministrativetasks.

SeeAlso:

OracleDatabaseAdministrator'sGuideforaconceptualoverviewofthecontrolfileandmoredetailsaboutmanagingcontrolfiles.

BackingUpandRestoringtheControlFile

Ifyouarenotusingarecoverycatalog,thecontrolfileisthesolestoragefortheRMANrepository,soitisdoublyimportantthatyouprotectit.Maintainalternatecontrolfilesthroughmultiplexingoroperatingsystemmirroring,andbackupthecontrolfilefrequently.

ConfigureCONTROLFILEAUTOBACKUPtoONtoensureextraprotectionforyourcontrolfile.

Solongasacontrolfileautobackupisavailable,RMANcanrestoretheSPFILEandbackupcontrolfile,andmountthedatabase.Afterthecontrolfileismounted,youcanrestoretheremainderofthedatabase.

Notethat,ifyourestoreacontrolfilefromautobackup,anypersistentsettingsyousetwiththeCONFIGUREcommandwillreverttothevaluestheyhadatthetimeofthecontrolfileautobackup.YoushouldreviewthesettingswiththeSHOWALLafterrestoringthecontrolfile.

SeeAlso:

∙"BackingUpControlFileswithRMAN"tolearnaboutmanualandautomaticcontrolfilebackups

∙OracleDatabaseBackupandRecoveryAdvancedUser'sGuidetolearnhowtorestoreadatabasewhenthecurrentcontrolfileandrecoverycatalogareunavailable

MonitoringtheOverwritingofControlFileRecords

Whenyoudonotusearecoverycatalog,thecontrolfileisthesolesourceofinformationaboutRMANbackups.Asyoumakebackups,Oraclerecordsthesebackupsinthecontrolfile.TopreventthecontrolfilefromgrowingwithoutboundtoholdRMANrepositorydata,recordscanbere-usediftheyareolderthanathreshholdyouspecify.

TheCONTROL_FILE_RECORD_KEEP_TIMEinitializationparameterdeterminestheminimumageindaysofarecordbeforeitcanbeoverwritten:

CONTROL_FILE_RECORD_KEEP_TIME=integer

Forexample,iftheparametervalueis14,thenanyrecordaged14daysandolderisacandidateforreuse.Informationinanoverwrittenrecordislost.Theoldestrecordavailableforre-usewillbeusedfirst.

WhenOracleneedstoaddnewRMANrepositoryrecordstothecontrolfile,butnorecordisolderthanthethreshhold,Oracleattemptstoexpandthesizeofthecontrolfile.Iftheunderlyingoperatingsystempreventstheexpansionofthecontrolfile(duetoadiskfullcondition,forinstance),Oracleoverwritestheoldestrecordinthecontrolfileandlogsthisactioninthealertlog.

ThedefaultvalueofCONTROL_FILE_RECORD_KEEP_TIMEis7days.Ifyouarenotusingarecoverycatalog,thensettheCONTROL_FILE_RECORD_KEEP_TIMEvaluetoslightlylongerthantheoldestfilethatyouneedtokeep.Forexample,ifyoubackupthedatabaseonceaweek,thenyouneedtokeepeverybackupatleastaweek.SetCONTROL_FILE_RECORD_KEEP_TIMEtoavaluesuchas10or14.

Caution:

Regardlessofwhetheryouusearecoverycatalog,neveruseRMANwhenCONTROL_FILE_RECORD_KEEP_TIMEissetto0.Ifyoudo,thenyoumaylosebackuprecords.

ManagingtheOverwritingofControlFileRecords:

Scenario

Assumethefollowingscenario:

∙Youdonotusearecoverycatalog.

∙CONTROL_FILE_RECORD_KEEP_TIMEissetto14.

∙Allrecordscurrentlyinthecontrolfilearebetween1and13daysold.

∙Thecontrolfileisatthemaximumsizepermittedbytheoperatingsystem.

Youmakeabackupofthedatabase.BecauseOraclecannotexpandthecontrolfilebeyondtheoperatingsystemfilesizelimit,itbeginsoverwritingrecordsinthecontrolfile,startingwiththoserecordsaged13days.Foreachrecordthatitoverwrites,itrecordsanentryinthealert.logsimilartotheoneshownhere:

kccwnc:

followingcontrolfilerecordwrittenover:

RECID#72Recno72Recordtimestamp

07/28/0022:

15:

21

Thread=1Seq#=3460

Backupsetkey:

stamp=372031415,count=17

Lowscn:

0x0000.3af33f36

07/27/0021:

00:

08

Nextscn:

0x0000.3af3871b

07/27/0023:

23:

54

Resetlogsscnandtime

scn:

0x0000.00000001

08/05/9910:

46:

44

Blockcount=102400Blocksize=512

Toguardagainstthistypeofscenario,usearecoverycatalog.Ifyoucannotusearecoverycatalog,thendothefollowingifpossible:

∙Storethecontrolfileinafilesystemratherthanrawdisk,sothatitcanexpandasneeded.

∙Monitorthealert.logtomakesurethatOracleisnotoverwritingcontrolfilerecords.

SeeAlso:

OracleDatabaseBackupandRecoveryAdvancedUser'sGuideforaconceptualoverviewofcontrolfilerecordsandhowtheyarere-used

InteractionofFlashRecoveryAreaandCONTROL_FILE_RECORD_KEEP_TIME

Wheacontrolfilerecordcontaininginformationaboutafilecreatedintheflashrecoveryareaisabouttobereused(becausetherecordisolderthanCONTROL_FILE_RECORD_KEEP_TIME),ifthefileiseligiblefordeletionthenthedatabasewillattempttodeletethefilefromtheflashrecoveryarea.Otherwise,Oraclewillexpandthesizeofthecontrolfilesectioncontainingtherecordforthisfile,loggingtheexpansioninthealertlogwithamessagelikethisexample:

kccwnc:

tringtoexpandcontrolfilesectionnnnnforOracleManagedFiles

wherennnnistherecordtypenumber.

IfOracleisunabletoexpandthecontrolfilesection,becausethecontrolfileisatthemaximumsizesupportedunderthehostoperatingsystem,youwillseethiswarninginthealertlog:

WARNING:

OracleManagedFilefilenameisunknowntocontrolfile.Thisisthe

resultoflimitationincontrolfilesizethatcouldnotkeepallrecoveryarea

files.

Thismeansthatthecontrolfilecannotholdallflashrecoveryareafilesneededtosatisfytheconfiguredretentionpolicy.

Thereareseveralwaystoavoidoralleviatethisproblem:

∙Useacontrolfileoflargerblocksize,preferablyonewith32Kblocksize.Toachievethis,youmustsettheSYSTEMtablespaceblocksizetobegreaterthanorequaltothecontrolfileblocksize,andyouneedtore-createthecontrolfileafterchangingDB_BLOCK_SIZE.

∙Makethefilesintheflashrecoveryareaeligiblefordeletion,bybackingthemuptotertiarystoragesuchastapewiththeRMANcommandBACKUPRECOVERYAREA,orbychangingtheretentionpolicytoashorterrecoverywindoworlowerdegreeofredundancy.

MaintainingtheRMANRepositoryintheControlFile

RMANprovidesseveralcommandsthatenableyoutocheckanddeleterecordsofbackupsaswellasphysicallyremovebackups.

CrosscheckingBackups

Toensurethatdataaboutbackupsintherecoverycatalogorcontrolfileissynchronizedwithcorrespondingdataondiskorinthemediamanagementcatalog,performacrosscheck.TheCROSSCHECKcommandoperatesonlyonfilesthatarerecordedintherecoverycatalogorthecontrolfile.

Thissectioncontainsthesetopics:

∙AboutRMANCrosschecks

∙CrosscheckingSpecificBackupSetsandCopies

∙CrosscheckingBackupsofSpecificDatabaseFiles

AboutRMANCrosschecks

CrosschecksupdateoutdatedRMANrepositoryinformationaboutbackupswhoserepositoryrecordsdonotmatchtheirphysicalstatus.Forexample,ifauserremovesarchivedlogsfromdiskwithanoperatingsystemcommand,therepositorystillindicatesthatthelogsareondisk,wheninfacttheyarenot.

Ifthebackupisondisk,thentheCROSSCHECKcommanddetermineswhethertheheaderofthefileisvalid.Ifthebackupisontape,thenthecommandsimplychecksthatthebackupexists.ThepossiblestatusvaluesforbackupsareAVAILABLE,UNAVAILABLE,andEXPIRED.Viewthestatusofbackupsinoneofthefollowinglocations:

∙TheLISTcommandoutput

∙V$BACKUP_FILES

∙VariousrecoverycatalogviewssuchasRC_DATAFILE_COPY,RC_ARCHIVED_LOG,andsoforth

Note:

TheCROSSCHECKcommanddoesnotdeleteoperatingsystemfilesorremoverepositoryrecords.YoumustusetheDELETEcommandfortheseoperations.

SeeAlso:

∙"DeletingBackups"tolearnhowtodeletefilesandupdaterepositoryrecords

∙OracleDatabaseRecoveryManagerReferenceforCROSSCHECKcommandsyntaxandadescriptionoftherepositorystatusvalues

CrosscheckingSpecificBackupSetsandCopies

YoucanusetheLISTcommandtoreportyourbackupsandthenusetheCROSSCHECKcommandtocheckthatthesefilesstillexist.TheDELETEEXPIREDcommanddeletesrepositoryrecordsforbackupsthatfailthecrosscheck.

Tocrosscheckspecifiedbackups:

1.IdentifythedesiredbackupsthatyouwanttocheckbyissuingaLISTcommand.Forexample,issue:

2.LISTBACKUP;#listsallbackupsets,proxycopies,andimagecopies

3.

4.Checkwhetherthespecifiedbackups.Forexample,enter:

5.CROSSCHECKBACKUP;#checksbackupsets,proxycopies,andimagecopies

6.CROSSCHECKCOPYOFDATABASE;

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 能源化工

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1