Recovery Manager Architecture.docx

上传人:b****1 文档编号:14958845 上传时间:2023-06-28 格式:DOCX 页数:13 大小:22.63KB
下载 相关 举报
Recovery Manager Architecture.docx_第1页
第1页 / 共13页
Recovery Manager Architecture.docx_第2页
第2页 / 共13页
Recovery Manager Architecture.docx_第3页
第3页 / 共13页
Recovery Manager Architecture.docx_第4页
第4页 / 共13页
Recovery Manager Architecture.docx_第5页
第5页 / 共13页
Recovery Manager Architecture.docx_第6页
第6页 / 共13页
Recovery Manager Architecture.docx_第7页
第7页 / 共13页
Recovery Manager Architecture.docx_第8页
第8页 / 共13页
Recovery Manager Architecture.docx_第9页
第9页 / 共13页
Recovery Manager Architecture.docx_第10页
第10页 / 共13页
Recovery Manager Architecture.docx_第11页
第11页 / 共13页
Recovery Manager Architecture.docx_第12页
第12页 / 共13页
Recovery Manager Architecture.docx_第13页
第13页 / 共13页
亲,该文档总共13页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

Recovery Manager Architecture.docx

《Recovery Manager Architecture.docx》由会员分享,可在线阅读,更多相关《Recovery Manager Architecture.docx(13页珍藏版)》请在冰点文库上搜索。

Recovery Manager Architecture.docx

RecoveryManagerArchitecture

RecoveryManagerArchitecture

ThischapterdescribestheRecoveryManager(RMAN)interfaceandthebasiccomponentsoftheRMANenvironment.

Thischaptercontainsthesetopics:

∙AbouttheRMANEnvironment

∙RMANCommandLineClient

∙RMANRepository

∙MediaManagement

AbouttheRMANEnvironment

RecoveryManager(RMAN)isaclientapplicationthatperformsbackupandrecoveryoperations.TheRecoveryManagerenvironmentconsistsofthevariousapplicationsanddatabasesthatplayaroleinabackupandrecoverystrategy.

Table 1-1listspossiblecomponentsoftheRMANenvironment.

Table1-1ComponentsoftheRMANEnvironment

Component

Description

Required?

Targetdatabase

Thecontrolfiles,datafiles,andoptionalarchivedredologsthatRMANisinchargeofbackinguporrestoring.RMANusesthetargetdatabasecontrolfiletogathermetadataaboutthetargetdatabaseandtostoreinformationaboutitsownoperations.Theworkofbackupandrecoveryisperformedbyserversessionsrunningonthetargetdatabase.

Yes

RMANclient

Theclientapplicationthatmanagesbackupandrecoveryoperationsforatargetdatabase.TheRMANclientcanuseOracleNettoconnecttoatargetdatabase,soitcanbelocatedonanyhostthatisconnectedtothetargethostthroughOracleNet.

Yes

Recoverycatalogdatabase

Adatabasecontainingtherecoverycatalogschema,whichcontainsthemetadatathatRMANusestoperformitsbackupandrecoveryoperations.

No

Recoverycatalogschema

TheuserwithintherecoverycatalogdatabasethatownsthemetadatatablesmaintainedbyRMAN.RMANperiodicallypropagatesmetadatafromthetargetdatabasecontrolfileintotherecoverycatalog.

No

Standbydatabase

Acopyoftheprimarydatabasethatisupdatedusingarchivedlogscreatedbytheprimarydatabase.RMANcancreateorbackupastandbydatabase.Youcanfailovertothestandbydatabaseiftheprimarydatabasegoesdown.

No

Duplicatedatabase

Acopyoftheprimarydatabasethatyoucanusefortestingpurposes.

No

Mediamanagementapplication

Avendor-specificapplicationthatallowsRMANtobackuptoastoragesystemsuchastape.

No

Mediamanagementcatalog

Avendor-specificrepositoryofinformationaboutamediamanagementapplication.

No

EnterpriseManager

Abrowser-basedinterfacetotheOracledatabase,includingbackupandrecoverythroughRMAN.

No

TheonlyrequiredcomponentsinanRMANenvironmentarethetargetdatabaseandtheRMANclient,butmostreal-worldconfigurationsaremorecomplicated.OnemightuseanRMANclientconnectingtomultiplemediamanagersandmultipletarget,recoverycatalog,andauxiliarydatabases,allaccessedthroughEnterpriseManager.

RMANSessionArchitecture

TheRMANclientapplicationdirectsdatabaseserversessionstoperformallbackupandrecoverytasks.Themeaningof"session"inthissensedependsontheoperatingsystem.Forexample,onUNIX,aserversessioncorrespondstoaserverprocess,whileonWindowsitcorrespondstoathreadwithinthedatabaseservice.

TheRMANclientitselfdoesnotperformbackup,restore,orrecoveryoperations.WhenyouconnecttheRMANclienttoatargetdatabase,RMANallocatesserversessionsonthetargetinstanceanddirectsthemtoperformtheoperations.TheRMANclientusesinternal,undocumentedPL/SQLpackagestocommunicatewiththetargetdatabaseandrecoverycatalog.

RMANCommandLineClient

UsetheRMANcommandlineclienttoentercommandsthatyoucanusetomanageallaspectsofbackupandrecoveryoperations.

EvenwhenyouusethebackupandrecoveryfeaturesinEnterpriseManagerthatarebuiltontopofRMAN,anRMANclientexecutesbehindthescenes.

Note:

AllRMANcommandsforOraclerelease8.1andhigheralsoworkinOracleDatabseRelease10g.

HowRMANCompilesandExecutesCommands

RMANprocessesmostcommandsinthetwophasesdiscussedinthissection:

CompilationPhase

Duringthecompilationphase,RMANdetermineswhichobjectsthecommandwillaccess(forexample,resolvingatablespacenameintoitscomponentdatafiles).Then,RMANconstructsasequenceofremoteprocedurecalls(RPCs)thatinstructtheserversessionsonthetargetdatabasetoperformthedesiredoperation.

ExecutionPhase

Duringtheexecutionphase,RMANsendstheRPCcallstothetargetdatabase,monitorstheirprogress,andcollectstheresults.Ifmorethanonechannelisallocated,thenRMANcanexecutecertaincommandsinparallelsothatallofthechannels'targetdatabasesessionsareconcurrentlyexecutinganRPCcall.

IssuingRMANCommands

RMANusesacommandlanguageinterpreter(CLI)thatcanexecutecommandsininteractiveorbatchmode.

EnteringCommandsattheRMANPrompt

TorunRMANcommandsinteractively,startRMANandthentypecommandsintothecommand-lineinterface.Forexample,youcanstartRMANfromtheUNIXcommandshellandthenexecuteinteractivecommandsasfollows:

%rmanTARGETSYS/oracle@trgtCATALOGrman/cat@catdb

AftertheRMANpromptisdisplayed,youcanentercommandssuchasthefollowing:

RMAN>BACKUPDATABASE;

UsingRMANwithCommandFiles

AcommandfileisatextfilewhichcontainsRMANcommandsasyouwouldenterthematthecommandline.Youcanruntheacommandfilebyspecifyingitsnameonthecommandline.Thecontentsofthecommandfilewillbeinterpretedasifenteredatthecommandline.IftheLOGcommandlineargumentisspecified,RMANdirectsoutputtothenamedlogfile.Commandfilesareonewaytoautomatescheduledbackupsthroughanoperatingsystemjobcontrolfacility.

Inthisexample,asampleRMANscriptisplacedintoacommandfilecalledcommandfile.rcv.Youcanrunthisfilefromtheoperatingsystemcommandlineandwritetheoutputintothelogfileoutfile.txtasfollows:

%rmanTARGET/CATALOGrman/cat@catdbCMDFILEcommandfile.rcvLOGoutfile.txt

SeeAlso:

OracleDatabaseRecoveryManagerReferenceformoreinformationaboutRMANcommandlineoptions

StoredScripts

AstoredscriptisablockofRMANjobcommandsthatisstoredintherecoverycatalog.Bystoringscriptsintherecoverycatalog,thescriptisavailabletoanyRMANclientthatconnectstothecatalogandthetargetdatabase.Storedscriptscanbeassociatedwithasingledatabaseinthecatalog,ortheycanbeglobalstoredscripts,whichcanbeexecutedagainstanytargetdatabaseinthecatalog.

SeeAlso:

"WorkingwithRMANStoredScriptsintheRecoveryCatalog"formoreonstoredscripts.Alsorefertothesamplescriptsinthe?

/rdbms/demodirectory.

CommandsValidOnlyinRUNBlocks

ThereareRMANcommandswhichareonlyvalidinRUNblocks.ThesetypicallyinvolvesettinguptheenvironmentwithinwhichthestatementsintheRUNblockwillexecute.TypicalofthisgroupareALLOCATECHANNELandSETNEWNAMEFORDATAFILE.UsingthesecommandsoutsideofaRUNblockwillgenerateanerror.

SeeAlso:

ThesyntaxdiagramsfortheRUNcommandinOracleDatabaseRecoveryManagerReferenceregardingwhichcommandsarevalidinRUNblocks

CommandsNotValidinRUNBlocks

ThereareanumberofRMANcommandswhichcannotbeusedinRUNblocks.TypicallytheseareusedtocontroltheRMANenvironment(connectingtodifferentdatabases,orconfiguringRMANdefaults),ortomanageorquerytherecoverycatalog(includingcreatingandusingstoredscripts).Herearesomeexamples:

∙CONNECT

∙CONFIGURE

∙CREATECATALOG,DROPCATALOG,UPGRADECATALOG

∙CREATESCRIPT,DELETESCRIPT,REPLACESCRIPT

∙LIST

∙REPORT

Youcanincludethesecommandsinsidecommandfiles,aslongastheyarenotwrappedinsideaRUNblock.Youcannotusetheminsideastoredscriptfromtherecoverycatalog,becausethecontentsofastoredscriptareexecutedwithinaRUNblock.

SeeAlso:

ThesyntaxdiagramsfortheRUNcommandinOracleDatabaseRecoveryManagerReferenceregardingwhichcommandsarevalidinRUNblocks

ControllingRMANOutput

WhenyourunRMANincommandlinemode,itsendstheoutputtotheterminal.IfyouspecifytheLOGoption,thenRMANwritestheoutputtoaspecifiedlogfileinstead.

OutputforcurrentlyexecutingRMANjobsisalsostoredintheV$RMAN_OUTPUTview,whichreadsonlyfrommemory(thatis,theinformationisnotstoredinthecontrolfile).TheV$RMAN_STATUSviewstoresmetadataaboutjobsinprogressaswellascompletedjobs.Themetadataforcompletedjobsisstoredinthecontrolfile.

RMANPipeInterface

TheRMANpipeinterfaceisanalternativemethodforissuingcommandstoRMANandreceivingtheoutputfromthosecommands.Withthisinterface,RMANobtainscommandsandsendsoutputbyusingtheDBMS_PIPEPL/SQLpackage.RMANdoesnotreadorwriteanydatausingtheoperatingsystemshell.Byusingthisinterface,itispossibletowriteaportableprogrammaticinterfacetoRMAN.

ThepipeinterfaceisinvokedbyusingthePIPEcommand-lineparameter.RMANusestwoprivatepipes:

oneforreceivingcommandsandtheotherforsendingoutput.ThenamesofthepipesarederivedfromthevalueofthePIPEparameter.Forexample,youcaninvokeRMANwiththefollowingcommand:

%rmanPIPEabcTARGETSYS/oracle@trgt

RMANopensthetwopipesinthetargetdatabase:

ORA$RMAN_ABC_IN,whichRMANusestoreceiveusercommands,andORA$RMAN_ABC_OUT,whichRMANusestosendalloutputbacktoRMAN.

AllmessagesonboththeinputandoutputpipesareoftypeVARCHAR2.

NotethatRMANdoesnotpermitthepipeinterfacetobeusedwithpublicpipes,becausetheyareapotentialsecurityproblem.Withapublicpipe,anyuserwhoknowsthenameofthepipecansendcommandstoRMANandinterceptitsoutput.

SeeAlso:

"ExecutingRMANCommandsThroughaPipe"tolearnhowtoexecuteRMANcommandsthroughapipe

RMANRepository

TheRMANrepositoryis

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

当前位置:首页 > 外语学习 > 法语学习

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2