RMAN Backups Concepts.docx

上传人:b****6 文档编号:8599957 上传时间:2023-02-01 格式:DOCX 页数:49 大小:50.62KB
下载 相关 举报
RMAN Backups Concepts.docx_第1页
第1页 / 共49页
RMAN Backups Concepts.docx_第2页
第2页 / 共49页
RMAN Backups Concepts.docx_第3页
第3页 / 共49页
RMAN Backups Concepts.docx_第4页
第4页 / 共49页
RMAN Backups Concepts.docx_第5页
第5页 / 共49页
点击查看更多>>
下载资源
资源描述

RMAN Backups Concepts.docx

《RMAN Backups Concepts.docx》由会员分享,可在线阅读,更多相关《RMAN Backups Concepts.docx(49页珍藏版)》请在冰豆网上搜索。

RMAN Backups Concepts.docx

RMANBackupsConcepts

RMANBackupsConcepts

ThischapterdescribesthebasicconceptsinvolvedinbackingupthedatabasewiththeRecoveryManager(RMAN)utility.

Thischaptercontainsthesetopics:

∙AboutRMANChannels

∙AboutRMANBackups

∙MultipleCopiesofRMANBackups

∙RMANBackupOptions:

Naming,Sizing,andSpeed

∙RMANBackupTypes

∙ControlFileandServerParameterFileAutobackups

∙BackupRetentionPolicies

∙BackupOptimization

∙RestartableBackups

∙ManagingBackupWindowsandPerformance:

BACKUP...DURATION

∙RMANBackupErrors

∙TestsandIntegrityChecksforBackups

AboutRMANChannels

AnRMANchannelrepresentsonestreamofdatatoadevicetype,andcorrespondstooneserversession.MostbackupandrecoverycommandsinRMANareexecutedbyserversessions.AsillustratedinFigure 2-1,eachchannelestablishesaconnectionfromtheRMANclienttoatargetorauxiliarydatabaseinstancebystartingaserversessionontheinstance.Theserversessionperformsthebackup,restore,andrecovery.

Figure2-1ChannelAllocation

Textdescriptionoftheillustrationbradv030.gif

YoucanusetheCONFIGURECHANNELcommandtoconfigurechannelsforusewithdiskortapeinallRMANsessionsusingautomaticchannelallocation,orallocatechannelsmanuallywithinaRUNblock.RMANcomespreconfiguredwithoneDISKchannelthatyoucanuseforbackupstodisk.

Whenyourunacommandthatrequiresachannelwithoutallocatingachannelexplicitly,thenRMANautomaticallyallocatesthechannelswiththeoptionsspecifiedintheCONFIGUREcommand.FortheBACKUPcommand,RMANallocatesonlyasingletypeofchannel,suchasDISK.FortheRESTOREcommandandmaintenancecommands(forexample,DELETE),RMANallocatesallnecessarychannelsforthedevicetypesrequiredtoexecutethecommand.

Tospecifythedevicetypetouseforanoperationexplicitly,usetheALLOCATECHANNELcommand,whichmustbeusedwithinaRUNblock,orALLOCATECHANNELFORMANTAINANCE,whichmustbeexecutedattheRMANprompt.

InaRealApplicationClustersconfiguration,therearespecialconsiderationsregardingchannelallocationandbackups.SeeOracleRealApplicationClustersAdministrator'sGuideformoredetails.

HowandwhentheALLOCATECHANNELorCONFIGURECHANNELcommandscausethemediamanagertoallocateresourcesisvendor-specific.Somemediamanagersallocateresourceswhenyouissuethecommand;othersdonotallocateresourcesuntilyouopenafileforreadingorwriting.

SeeAlso:

OracleDatabaseRecoveryManagerReferenceforALLOCATECHANNELsyntaxandOracleDatabaseRecoveryManagerReferenceonALLOCATECHANNELFORMAINTENANCE

AutomaticandManualChannelAllocation

Youcanusetheautomaticchannelallocationfeaturetoconfigureasetofpersistent,automaticchannelsforuseinallRMANsessions.YoucanusethemanualchannelallocationfeaturetospecifychannelsforcommandsusedwithinaRUNblock.

RMANallocatesautomaticchannelsaccordingtothesettingsinthesecommands:

∙CONFIGUREDEVICETYPE...PARALLELISM

∙CONFIGUREDEFAULTDEVICETYPE

∙CONFIGURECHANNEL

Forexample,youcanissuethefollowingcommandsattheRMANprompt:

#sinceyoudonotmanuallyallocatechannels,RMANusespreconfiguredchannels

BACKUPDATAFILE3;

RESTORETABLESPACEusers;

Whenyourunacommandthatrequireschannels,andnochannelshavebeenallocatedusingtheALLOCATEcommand,RMANautomaticallyallocateschannelsaccordingtovaluessetwiththeCONFIGUREcommandinthefollowingcases:

∙YouusecommandssuchasBACKUP,RESTORE,orDELETEoutsideofaRUNblock.

∙YouusecommandswithinaRUNblockbutdonotallocateanychannelswithintheRUNblock.

YoucanoverrideautomaticchannelallocationsettingsbymanuallyallocatingchannelswithinaRUNblock.Manualchannelsalwaysoverrideautomaticchannels.Forexample,youoverrideautomaticchannelallocationwhenyouissueacommandasfollows:

RUN

{

ALLOCATECHANNELc1DEVICETYPEsbt;

BACKUPDATABASEPLUSARCHIVELOG;

}

RMANoptimizesautomaticchannelallocationbyleavingautomaticchannelsallocatedsolongaseachnewcommandrequiresexactlythesamechannelconfigurationasthepreviouscommand.Forexample,RMANcanusethesamepreallocatedchannelsforthefollowingseriesofcommands:

BACKUPDATAFILE1;

BACKUPCURRENTCONTROLFILE;

BACKUPARCHIVELOGALL;

IfyouissueacommandsuchasALLOCATEorCONFIGURE,thenRMANautomaticallyreleasesthepreallocatedchannels.

SeeAlso:

"ConfiguringAutomaticChannels"tolearnhowtoconfigureautomaticchannels

AutomaticChannelDeviceConfigurationandParallelism

TheCONFIGUREDEVICETYPE...PARALLELISMcommandspecifiesthenumberofautomaticchannelstoallocateforaspecifieddevicetype.Forexample,ifyouconfigureparallelismto3foradevicetype,thenRMANallocatesthreechannelsforthedevicetypewhenusingautomaticchannels.

YoucanchangeaparallelismsettingbyissuinganotherCONFIGUREDEVICETYPE...PARALLELISMcommand.ThisexampleconfiguresPARALLELISM2andthenchangesitto3:

CONFIGUREDEVICETYPEDISKPARALLELISM2;

CONFIGUREDEVICETYPEDISKPARALLELISM3;

TheparallelismsettingdefinesthenumberofchannelsforadevicethatRMANallocatesinparallel.Itdoesnothavetocorrespondtotheactualnumberofchannelsconfiguredforthedevice.Forexample,youcanmanuallyconfigurefourdifferentsbtchannelsandsetPARALLELISMforsbtto2,1,or10.

YoucanviewthedefaultsettingforparallelismbyrunningtheSHOWDEVICETYPEcommand.Forexample:

RMAN>SHOWDEVICETYPE;

RMANconfigurationparametersare:

CONFIGUREDEVICETYPEDISKPARALLELISM1BACKUPTYPETOBACKUPSET;#default

AsalwayswhentheSHOWcommandisusedtoviewthevalueofaparameter,RMANincludesa"#default"commentattheendofthelineiftheRMANdefaultvaluehasnotbeenoverridden.

ThefollowingexampleconfiguresthedefaultdevicetosbtandthendisplaystheresultingconfigurationusingtheSHOWDEVICETYPEcommand:

RMAN>CONFIGUREDEFAULTDEVICETYPETOsbt;

newRMANconfigurationparameters:

CONFIGUREDEFAULTDEVICETYPETO'sbt';

newRMANconfigurationparametersaresuccessfullystored

RMAN>SHOWDEVICETYPE;

RMANconfigurationparametersare:

CONFIGUREDEVICETYPESBTPARALLELISM1;#default

CONFIGUREDEVICETYPEDISKPARALLELISM1BACKUPTYPETOBACKUPSET;#

default

SeeAlso:

"ConfiguringaGenericAutomaticChannelforaDeviceType"

AutomaticChannelDefaultDeviceTypes

RuntheCONFIGUREDEFAULTDEVICETYPEcommandtospecifyadefaultdevicetypeforautomaticchannels.Forexample,youmaymakebackupstotapemostofthetimeandonlyoccasionallymakeabackuptodisk.Inthiscase,configurechannelsfordiskandtapedevices,butmakesbtthedefaultdevicetype:

CONFIGUREDEVICETYPEDISKPARALLELISM1;#configuredevicedisk

CONFIGUREDEVICETYPEsbtPARALLELISM2;#configuredevicesbt

CONFIGUREDEFAULTDEVICETYPETOsbt;

Now,RMANwill,bydefault,usesbtchannelsforbackups.Forexample,ifyourunthefollowingcommand:

BACKUPTABLESPACEusers;

RMANonlyallocateschannelsoftypesbtduringthebackupbecausesbtisthedefaultdevice.

Youcanoverridethedefaultdeviceforbackupsbyspecifyingadifferentdeviceonthecommand.Forexample:

BACKUPDEVICETYPEsbtDATABASE;

IfthedefaultdevicetypeisDISK,thentheprecedingcommandoverridesthisdefaultandusesthesbtchannelconfiguration.Notethatthiscommandfailsunlessyouhaveconfiguredthesbtdeviceorconfiguredsbtchannels.

Whenrestoringfiles,RMANallocatesallautomaticchannelsaccordingtothesettingsconfiguredforeachdevicetype.Thedefaultdevicetypeconfigurationisirrelevant.Forexample,ifyouconfigurePARALLELISMto3forthedefaultsbtdeviceandPARALLELISMto2forDISK,thenRMANautomaticallyallocatesthreesbtchannelsandtwoDISKchannelsduringtherestore.

AutomaticChannelNamingConventions

RMANusesthefollowingconventionforchannelnaming:

ORA_devicetype_n,wheredevicetypereferstotheuser'sdevicetype(suchasDISKorsbt_tape)andnreferstothechannelnumber.

Note:

Thesbtandsbt_tapedevicetypesaresynonymous,butRMANoutputalwaysdisplayssbt_tapewhethertheinputissbtorsbt_tape.

Forexample,RMANnamesthefirstDISKchannelORA_DISK_1,thesecondORA_DISK_2,andsoforth.RMANnamesthefirstsbtchannelORA_SBT_TAPE_1,thesecondORA_SBT_TAPE_2,andsoforth.Whenyouparallelizechannels,RMANalwaysallocateschannelsinnumericalorder,startingwith1andendingwiththeparallelismsetting(CONFIGUREDEVICETYPE...PARALLELISMn),asinthisexample:

ORA_SBT_TAPE_1

ORA_SBT_TAPE_2

ORA_SBT_TAPE_3

Automaticchannelallocationalsoappliestomaintenancecommands.IfRMANallocatesanautomaticmaintenancechannel,thenitusesthesamenamingconventionasanyotherautomaticallyallocatedchannel.IfyoumanuallyallocateamaintenancechannelusingALLOCATECHANNELFORMAINTENANCE,thenRMANusesthefollowingconventionforchannelnaming:

ORA_MAINT_devicetype_n,wheredevicetypereferstotheuser'sdevicetype(forexample,DISKorsbt)andnreferstothechannelnumber.Forexample,RMANusesthesenamesfortwomanuallyallocateddiskchannels:

ORA_MAINT_DISK_1

ORA_MAINT_DISK_2

NotethatifyouruntheCONFIGUREDEVICETYPEcommandtoconfigureadevicetypeanddonotrunCONFIGURECHANNELforthisdevicetype,thenRMANallocatesallchannelswithoutotherchannelcontroloptions.Forexample,assumethatyouconfigurethesbtdeviceandrunabackupasfollows:

CONFIGUREDEVICETYPEsbtPARALLELISM1;

BACKUPDEVICETYPEsbtDATABASE;

Ineffect,RMANdoesthefollowing:

RUN

{

ALLOCATECHANNELORA_SBT_TAPE_1DEVICETYPEsbt;

BACKUPDATABASE;

}

Channelnam

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

当前位置:首页 > 考试认证 > 公务员考试

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

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