RMAN Tablespace PointinTime Recovery TSPITRWord下载.docx
《RMAN Tablespace PointinTime Recovery TSPITRWord下载.docx》由会员分享,可在线阅读,更多相关《RMAN Tablespace PointinTime Recovery TSPITRWord下载.docx(26页珍藏版)》请在冰豆网上搜索。
∙UnderstandingRMANTSPITR
∙PlanningandPreparingforTSPITR
∙PerformingBasicRMANTSPITR
∙PerformingCustomizedRMANTSPITRwithanRMAN-ManagedAuxiliaryInstance
∙PerformingRMANTSPITRUsingYourOwnAuxiliaryInstance
∙TroubleshootingRMANTSPITR
UnderstandingRMANTSPITR
InordertouseTSPITReffectively,youneedtounderstandwhatproblemsitcansolveforyou,whatthemajorelementsusedinTSPITRare,whatRMANdoesduringTSPITR,andlimitationsonwhenandhowitcanbeapplied.
RMANTSPITRConcepts
Figure
10-1illustratesthecontextwithinwhichTSPITRtakesplace,andageneraloutlineoftheprocess.
Figure10-1TablespacePoint-in-TimeRecovery(TSPITR)Architecture
Textdescriptionoftheillustrationbradv032.gif
Thefigurecontainsthefollowingentities:
∙Thetargetinstance,containingthetablespacetoberecovered
∙TheRecoveryManagerclient
∙Thecontrolfileand(optional)recoverycatalog,usedfortheRMANrepositoryrecordsofbackupactivity
∙Archivedredologsandbackupsetsfromthetargetdatabase,whicharethesourceofthereconstructedtablespace.
∙Theauxiliaryinstance,anOracledatabaseinstanceusedintherecoveryprocesstoperformtheactualworkofrecovery.
TherearefourotherimportanttermsrelatedtoTSPITR,whichwillbeusedintherestofthisdiscussion:
∙Thetargettime,thepointintimeorSCNthatthetablespacewillbeleftatafterTSPITR
∙Therecoveryset,whichconsistsofthedatafilescontainingthetablespacestoberecovered;
∙Theauxiliaryset,whichincludesdatafilesrequiredforTSPITRoftherecoverysetwhicharenotthemselvespartoftherecoveryset.Theauxiliarysettypicallyincludes:
∙AcopyoftheSYSTEMtablespace
∙Datafilescontainingrollbackorundosegmentsfromthetargetinstance
∙Insomecases,atemporarytablespace,usedduringtheexportofdatabaseobjectsfromtheauxiliaryinstance
Theauxiliaryinstancehasotherfilesassociatedwithit,suchasacontrolfile,parameterfile,andonlinelogs,buttheyarenotpartoftheauxiliaryset.
Theauxiliarydestination,anoptionallocationondiskwhichcanbeusedtostoreanyoftheauxiliarysetdatafiles,controlfilesandonlinelogsoftheauxiliaryinstanceduringTSPITR.FilesstoredherecanbedeletedafterTSPITRiscomplete.
Allofthesetermswillbereferencedthroughouttheremainderofthischapter.
HowTSPITRWorksWithanRMAN-ManagedAuxiliaryInstance
ToperformTSPITRoftherecoverysetusingRMANandanautomatedauxiliaryinstance,youcarryoutthepreparationsforTSPITRdescribedin"
PlanningandPreparingforTSPITR"
andthenissuetheRECOVERTABLESPACEcommand,specifying,ataminimum,thetablespacesoftherecoverysetandthetargettimeforthepoint-in-timerecovery,and,ifdesired,anauxiliarydestinationaswell.
RMANthencarriesoutthefollowingsteps:
1.Ifthereisnoconnectiontoanauxiliaryinstance,RMANcreatestheauxiliaryinstance,startsitupandconnectstoit.
2.Takesthetablespacestoberecoveredofflineinthetargetdatabase
3.Restoresabackupcontrolfilefromapointintimebeforethetargettimetotheauxiliaryinstance
4.Restoresthedatafilesfromtherecoverysetandtheauxiliarysettotheauxiliaryinstance.Filesarerestoredeitherinlocationsyouspecifyforeachfile,ortheoriginallocationofthefile(forrecoverysetfiles)orintheauxiliarydestination(forauxiliarysetfiles,ifyouusedtheAUXILIARYDESTINATIONargumentofRECOVERTABLESPACE)
5.Recoverstherestoreddatafilesintheauxiliaryinstancetothespecifiedtime
6.OpenstheauxiliarydatabasewiththeRESETLOGSoption
7.Exportsthedictionarymetadataaboutobjectsintherecoveredtablespacestothetargetdatabase
8.Shutsdowntheauxiliaryinstance
9.IssuesSWITCHcommandsonthetargetinstance,sothatthetargetdatabasecontrolfilenowpointstothedatafilesintherecoverysetthatwerejustrecoveredattheauxiliaryinstance.
10.Importsthedictionarymetadatafromtheauxiliaryinstancetothetargetinstance,allowingtherecoveredobjectstobeaccessed.
11.Deletesallauxiliarysetfiles.
AtthatpointtheTSPITRprocessiscomplete.Therecoverysetdatafilesar