Backup and Recovery Overview.docx

上传人:b****8 文档编号:9947982 上传时间:2023-02-07 格式:DOCX 页数:18 大小:26.58KB
下载 相关 举报
Backup and Recovery Overview.docx_第1页
第1页 / 共18页
Backup and Recovery Overview.docx_第2页
第2页 / 共18页
Backup and Recovery Overview.docx_第3页
第3页 / 共18页
Backup and Recovery Overview.docx_第4页
第4页 / 共18页
Backup and Recovery Overview.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

Backup and Recovery Overview.docx

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

Backup and Recovery Overview.docx

BackupandRecoveryOverview

BackupandRecoveryOverview

Thischapterprovidesageneraloverviewofbackupandrecoveryconcepts,thefilesinanOracledatabaserelatedtobackupandrecovery,andthetoolsavailableformakingbackupsofyourdatabase,recoveringfromdatalossorothererror,andmaintainingrecordsofyourbackups.

Thischapterincludesthefollowingtopics:

∙WhatisBackupandRecovery?

∙BackupandRecovery:

BasicConcepts

∙TheDatabaseRecoveryProcess:

BasicConcepts

∙FormsofDataRecovery

∙BackupandRecoverywithRMAN

∙MatchingFailurestoBackupandRecoveryTechniques

∙AutomaticDisk-BasedBackupandRecovery:

TheFlashRecoveryArea

∙SystemRequirementsforBackupandRecoveryMethods

∙FeatureComparisonofBackupMethods

WhatisBackupandRecovery?

Ingeneral,backupandrecoveryreferstothevariousstrategiesandproceduresinvolvedinprotectingyourdatabaseagainstdatalossandreconstructingthedatabaseafteranykindofdataloss.

PhysicalBackupsandLogicalBackups

Abackupisacopyofdatafromyourdatabasethatcanbeusedtoreconstructthatdata.Backupscanbedividedintophysicalbackupsandlogicalbackups.

Physicalbackupsarebackupsofthephysicalfilesusedinstoringandrecoveringyourdatabase,suchasdatafiles,controlfiles,andarchivedredologs.Ultimately,everyphysicalbackupisacopyoffilesstoringdatabaseinformationtosomeotherlocation,whetherondiskorsomeofflinestoragesuchastape.

Logicalbackupscontainlogicaldata(forexample,tablesorstoredprocedures)exportedfromadatabasewithanOracleexportutilityandstoredinabinaryfile,forlaterre-importingintoadatabaseusingthecorrespondingOracleimportutility..

Seealso:

OracleDatabaseUtilitiesformoredetailsaboutimportingandexportingdatausingOracleexportandimportutilities.

Physicalbackupsarethefoundationofanysoundbackupandrecoverystrategy.Logicalbackupsareausefulsupplementtophysicalbackupsinmanycircumstancesbutarenotsufficientprotectionagainstdatalosswithoutphysicalbackups.

Unlessotherwisespecified,theterm"backup"asusedinthebackupandrecoverydocumentationreferstophysicalbackups,andtobackuppartorallofyourdatabaseistotakesomekindofphyscialbackup.Thefocusinthebackupandrecoverydocumentationsetwillbealmostexclusivelyonphysicalbackups.

ErrorsandFailuresRequiringRecoveryfromBackup

WhilethereareseveraltypesofproblemthatcanhaltthenormaloperationofanOracledatabaseoraffectdatabaseI/Ooperations,onlytwotypicallyrequireDBAinterventionandmediarecovery:

mediafailure,andusererrors.

OtherfailuresmayrequireDBAinterventiontorestartthedatabase(afteraninstancefailure)orallocatemorediskspace(afterstatementfailuredueto,forinstance,afulldatafile)butthesesituationswillnotgenerallycausedatalossorrequirerecoveryfrombackup.

UserError

Usererrorsoccurwhen,eitherduetoanerrorinapplicationlogicoramanualmis-step,datainyourdatabaseischangedordeletedincorrectly.Datalossduetousererrorincludessuchmisstepsasdroppingimportanttablesordeletingorchangingthecontentsofatable.Whileusertrainingandcarefulmanagementofprivilegescanpreventmostusererrors,yourbackupstrategydetermineshowgracefullyyourecoverthelostdatawhenusererrordoescausedataloss.

MediaFailure

Amediafailureisthefailureofareadorwriteofadiskfilerequiredtorunthedatabase,duetoaphysicalproblemwiththedisksuchasaheadcrash.Anydatabasefilecanbevulnerabletoamediafailure.

Theappropriaterecoveryfromamediafailuredependsonthefilesaffectedandthetypesofbackupavailable.

OracleBackupandRecoverySolutions:

RMANandUser-ManagedBackup

Forperformingbackupandrecoverybasedonphysicalbackups,youhavetwosolutionsavailable:

∙RecoveryManager(RMAN),atool(withcommand-lineclientandEnterpriseManagerGUIinterfaces)thatintegrateswithsessionsrunningontheOracleservertoperformarangeofbackupandrecoveryactivities,aswellasmaintainingarepositoryofhistoricaldataaboutyourbackups

∙Thetraditionaluser-managedbackupandrecovery,whereyoudirectlymanagethefilesthatmakeupyourdatabasewithamixtureofhostoperatingsystemcommandsandSQL*Plusbackupandrecovery-relatedcapabilities

BothmethodsaresupportedbyOracleCorporationandarefullydocumented.RecoveryManageris,however,thepreferredsolutionfordatabasebackupandrecovery.Itcanperformthesametypesofbackupandrecoveryavailablethroughuser-managedmethodsmoreeasily,providesacommoninterfaceforbackuptasksacrossdifferenthostoperatingsystems,andoffersanumberofbackuptechniquesnotavailablethroughuser-managedmethods.

MostofthebackupandrecoverydocumentationsetwillfocusonRMAN-basedbackupandrecovery.User-managedbackupandrecoverytechniquesarecoveredinthelaterchaptersofOracleDatabaseBackupandRecoveryAdvancedUser'sGuide.

WhetheryouuseRMANoruser-managedmethods,youcansupplementyourphysicalbackupswithlogicalbackupsofschemaobjectsmadeusingdataexportutilities.Datathussavedcanlaterbeimportedtore-createthisdataafterrestoreandrecovery.However,logicalbackupsareforthemostpartbeyondthescopeofthebackupandrecoverydocumentation.

BackupandRecovery:

BasicConcepts

Thephysicalstructuresofthedatabaseandtheroleeachplaysinthedatabaserecoveryprocessarewhatdeterminetheformsofbackupandrecoveryavailablethroughuser-managedtechniquesandthroughRMAN.

PhysicalDatabaseStructuresUsedinRecoveringData

ThefilesandotherstructuresthatmakeupanOracledatabasestoredataandsafeguarditagainstpossiblefailures.ThissectionintroduceseachofthephysicalstructuresthatmakeupanOracledatabaseandtheirroleinthereconstructionofadatabasefrombackup.Thissectioncontainsthesetopics:

∙DatafilesandDataBlocks

∙RedoLogs

∙UndoSegments

∙ControlFiles

DatafilesandDataBlocks

AnOracledatabaseconsistsofoneormorelogicalstorageunitscalledtablespaces.EachtablespaceinanOracledatabaseconsistsofoneormorefilescalleddatafiles,physicalfilesunderthehostoperatingsysteminwhichthedatabaseisrunning.

Adatabase'sdataiscollectivelystoredinthedatafilesthatconstituteeachtablespaceofthedatabase.ThesimplestOracledatabasewouldhaveonetablespace,storedinonedatafile.Thedatbasemanagesthestoragespaceinthedatafilesofadatabaseinunitscalleddatablocks.Adatablockisthesmallestunitofdatausedbyadatabase.Datablocksarethesmallestunitsofstoragethatthedatabasecanuseorallocate.

Modifiedornewdataisnotwrittentodatafilesimmediately.Updatesarebufferedinmemoryandwrittentodatafilesatintervals.Ifadatabasehasnotgonethroughanormalshutdown(thatis,ifitisopen,orexitedabnormally,asinaninstancefailureoraSHUTDOWNABORT)thentherearetypicallychangesinmemorythathavenotbeenwrittentothedatafiles.Datafilesthatwererestoredfrombackup,orwerenotclosedduringaconsistentshutdown,aretypicallynotcompletelyuptodate.

Copiesofthedatafilesofadatabaseareacriticalpartofanybackup.

Seealso:

OracleDatabaseConceptsformoredetailaboutthestructureandcontentsofdatafilesanddatablocks.

RedoLogs

Redologsrecordallchangesmadetoadatabase'sdatafiles.Withacompletesetofredologsandanoldercopyofadatafile,thedatabasecanreapplythechangesrecordedintheredologstore-createthedatabaseatanypointbetweenthebackuptimeandtheendofthelastredolog.Eachtimedataischangedinthedatabase,thatchangeisrecordedintheonlineredologfirst,beforeitisappliedtothedatafiles.AnOracledatabaserequiresatleasttwoonlineredologgroups,andineachgroupthereisatleastoneonlineredologmember,anindividualredologfilewherethechangesarerecorded.

Atintervals,thedatabaserotatesthroughtheonlineredologgroups,storingchangesinthecurrentonlineredologwhilethegroupsnotinusecanbecopiedtoanarchivelocation,wheretheyarecalledarchivedredologs(or,collectively,thearchivedredolog).YoucanrunyourdatabaseinARCHIVELOGmode(inwhichthisarchivingofredologfilesisenabled)orNOARCHIVELOGmode(inwhichredologfilesaresimplyoverwritten).

Preservingthearchivedredologisamajorpartofmostbackupstrategies,astheycontainarecordofallupdatestodatafiles.Backupstrategiesofteninvolvecopyingthearchivedredologstodiskortapeforlonger-termstorage.RunninginNOARCHIVELOGmodelimitsyourdatarecoveryoptions.

Seealso:

OracleDatabaseAdministrator'sGuideformoredetailsabouttheonlineredologs,OracleDatabaseAdministrator'sGuideformoredetailsaboutarchivedredologs,and"DecidingBetweenARCHIVELOGandNOARCHIVELOGMode"foradiscussionoftheimplicationsofarchivingordiscardingyourredologfiles.

ControlFiles

Thecontrolfilecontainsacrucialrecordofthephysicalstructuresofthedatabaseandtheirstatus.Severaltypesofinformationstoredinthecontrolfilearerelatedtobackupandrecovery:

∙Databaseinformation(RESETLOGSSCNandtimestamp)

∙Tablespaceanddatafilerecords(filenames,datafilecheckpoints,read/writestatus,offlineranges)

∙Informationaboutredothreads(currentonlineredolog)

∙Logrecords(logsequencenumbers,SCNrangeineachlog)

∙ArecordofpastRMANbackups

∙Informationaboutcorruptdatafileblocks

Therecoveryprocessfordatafilesisinpartguidedbystatusinformationinthecont

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

当前位置:首页 > 农林牧渔 > 林学

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

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