Managing the Recovery Catalog.docx

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

Managing the Recovery Catalog.docx

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

Managing the Recovery Catalog.docx

ManagingtheRecoveryCatalog

ManagingtheRecoveryCatalog

ThischapterdescribeshowtomanageanRMANrecoverycatalog,whichholdsRMANrepositorydataforoneormoredatabasesinaseparatedatabaseschema,inadditiontousingthecontrolfilesofthedatabases.

Thischaptercontainsthesetopics:

∙CreatingaRecoveryCatalog

∙ManagingTargetDatabaseRecordsintheRecoveryCatalog

∙ResynchronizingtheRecoveryCatalog

∙WorkingwithRMANStoredScriptsintheRecoveryCatalog

∙ManagingtheControlFileWhenYouUseaRecoveryCatalog

∙BackingUpandRecoveringtheRecoveryCatalog

∙ExportingandImportingtheRecoveryCatalog

∙IncreasingAvailabilityoftheRecoveryCatalog

∙QueryingtheRecoveryCatalogViews

∙DeterminingtheSchemaVersionoftheRecoveryCatalog

∙UpgradingtheRecoveryCatalog

∙DroppingtheRecoveryCatalog

SeeAlso:

OracleDatabaseBackupandRecoveryBasicstolearnhowtomanagetheRMANcontrolfilerepositorywithoutarecoverycatalog

CreatingaRecoveryCatalog

Creatingarecoverycatalogisathree-stepprocess:

youmustconfigurethedatabasethatwillcontaintherecoverycatalog,createtherecoverycatalogowner,andthencreatetherecoverycatalogitself.

ConfiguringtheRecoveryCatalogDatabase

Whenyouusearecoverycatalog,RMANrequiresthatyoumaintainarecoverycatalogschema.Therecoverycatalogisstoredinthedefaulttablespaceoftheschema.NotethatSYScannotbetheowneroftherecoverycatalog.

Decidewhichdatabaseyouwillusetoinstalltherecoverycatalogschema,andalsohowyouwillbackupthisdatabase.Youshouldnotinstallthecataloginthetargetdatabase:

thistacticdefeatsthepurposeofthecatalog.Also,decidewhethertooperatethecatalogdatabaseinARCHIVELOGmode,whichisrecommended.

PlanningtheSizeoftheRecoveryCatalogSchema

Youmustallocatespacetobeusedbythecatalogschema.Thesizeoftherecoverycatalogschemadependsuponthenumberofdatabasesmonitoredbythecatalog,andthenumberandsizeofRMANscriptsstoredinthecatalog.Theschemaalsogrowsasthenumberofarchivedredologfilesandbackupsforeachdatabasegrows.

Foranexample,assumethatthetrgtdatabasehas100files,andyoubackupthedatabaseonceaday,producing50backupsetscontaining1backuppieceeach.Ifyouassumethateachrowinthebackuppiecetableusesthemaximumamountofspace,thenonedailybackupwillconsumelessthan170KBintherecoverycatalog.So,ifyoubackuponceadayforayear,thenthetotalstorageinthisperiodisabout62MB.Assumeapproximatelythesameamountforarchivedlogs.Hence,theworstcaseisabout120MBforayearformetadatastorage.

Foramoretypicalcaseinwhichonlyaportionofthebackuppiecerowspaceisused,15MBforeachyearisarealisticestimate.

Ifyouplantoregistermultipledatabasesinyourrecoverycatalog,remembertoaddupthespacerequiredforeachonebasedonthepreviouscalculationtoarriveatatotalsizeforthedefaulttablespaceoftherecoverycatalogschema.

AllocatingDiskSpacefortheRecoveryCatalogDatabase

Ifyouarecreatingyourrecoverycataloginanalready-existingdatabase,addenoughroomtoholdthedefaulttablespacetotherecoverycatalogschema.Ifyouarecreatinganewdatabasetoholdyourrecoverycatalog,then,inadditiontothespacefortherecoverycatalogschemaitself,youmustallowspaceforotherfilesintherecoverycatalogdatabase:

∙SYSTEMtablespace

∙Temporarytablespaces

∙Rollbacksegmenttablespaces

∙Onlineredologfiles

Mostofthespaceusedintherecoverycatalogdatabaseisdevotedtosupportingtablespaces,forexample,theSYSTEM,temporary,androllbackorundotablespaces.Table 13-1describestypicalspacerequirements.

Table13-1TypicalRecoveryCatalogSpaceRequirementsfor1Year

TypeofSpace

SpaceRequirement

SYSTEMtablespace

90MB

Temptablespace

5MB

Rollbackorundotablespace

5MB

Recoverycatalogtablespace

15MBforeachdatabaseregisteredintherecoverycatalog

Onlineredologs

1MBeach(3groups,eachwith2members)

Caution:

Ensurethattherecoverycatalogandtargetdatabasesdonotresideonthesamedisk.Ifadiskcontainingbothyourrecoverycatalogandyourtargetdatabasesfailed,yourrecoveryprocesswouldbemuchmorecomplicated.Ifpossible,takeothermeasuresaswelltoeliminatecommonpointsoffailurebetweenyourrecoverycatalogdatabaseandthedatabasesyouarebackingup.

CreatingtheRecoveryCatalogOwner

Afterchoosingtherecoverycatalogdatabaseandcreatingnecessaryspace,youarereadytocreatetheowneroftherecoverycatalogandgrantthisusernecessaryprivileges.

Assumethefollowingbackgroundinformationfortheinstructionsinthefollowingsections:

∙UserSYSwithpasswordoraclehasSYSDBAprivilegesontherecoverycatalogdatabasecatdb.

∙Atablespacecalledtoolsintherecoverycatalogdatabasecatdbstorestherecoverycatalog.NotethattouseanRMANreservedwordasatablespacename,youmustencloseitinquotesandputitinuppercase.(RefertoOracleDatabaseRecoveryManagerReferenceforalistofRMANreservedwords.)

∙Atablespacecalledtempexistsintherecoverycatalogdatabase.

∙Thedatabaseisconfiguredinthesamewayasallnormaldatabases,forexample,catalog.sqlandcatproc.sqlhavesuccessfullyrun.

Tocreatetherecoverycatalogschemaintherecoverycatalogdatabase:

1.StartSQL*Plusandthenconnectwithadministratorprivilegestothedatabasecontainingtherecoverycatalog.Forexample,enter:

2.CONNECTSYS/oracle@catdbASSYSDBA

3.

4.Createauserandschemafortherecoverycatalog.Forexample,enter:

5.CREATEUSERrmanIDENTIFIEDBYcat

6.TEMPORARYTABLESPACEtemp

7.DEFAULTTABLESPACEtools

8.QUOTAUNLIMITEDONtools;

9.

10.GranttheRECOVERY_CATALOG_OWNERroletotheschemaowner.Thisroleprovidestheuserwithallprivilegesrequiredtomaintainandquerytherecoverycatalog.

11.SQL>GRANTRECOVERY_CATALOG_OWNERTOrman;

CreatingtheRecoveryCatalog

Aftercreatingthecatalogowner,createthecatalogtableswiththeRMANCREATECATALOGcommand.Thecommandcreatesthecataloginthedefaulttablespaceofthecatalogowner.

Tocreatetherecoverycatalog:

1.Connecttothedatabasethatwillcontainthecatalogasthecatalogowner.Forexample,enterthefollowingfromtheoperatingsystemcommandline:

2.%rmanCATALOGrman/cat@catdb

3.

YoucanalsoconnectfromtheRMANprompt:

%rman

RMAN>CONNECTCATALOGrman/cat@catdb

4.RuntheCREATECATALOGcommandtocreatethecatalog.Thecreationofthecatalogcantakeseveralminutes.Ifthecatalogtablespaceisthisuser'sdefaulttablespace,thenyoucanrunthiscommand:

5.CREATECATALOG;

6.

IfyouspecifythetablespacenameintheCREATECATALOGcommand,andifthetablespacenameisanRMANreservedword,thenitmustbeuppercaseandenclosedinquotes.Forexample:

CREATECATALOGTABLESPACE'CATALOG';

7.Optionally,startSQL*Plusandquerytherecoverycatalogtoseewhichtableswerecreated:

8.SQL>SELECTTABLE_NAMEFROMUSER_TABLES;

SeeAlso:

OracleDatabaseSQLReferencefortheSQLsyntaxfortheGRANTandCREATEUSERstatements,andOracleDatabaseRecoveryManagerReferenceforCREATECATALOGcommandsyntax

ManagingTargetDatabaseRecordsintheRecoveryCatalog

Thissectiondescribeshowtoregister,unregister,andresettargetdatabaserecordsintherecoverycatalog.

RegisteringaDatabaseintheRecoveryCatalog

Thefirststepinusingarecoverycatalogwithatargetdatabaseisregisteringthedatabaseintherecoverycatalog.Usethefollowingprocedure:

1.Aftermakingsuretherecoverycatalogdatabaseisopen,connectRMANtothetargetdatabaseandrecoverycatalogdatabase.Forexample,issuethefollowingtoconnecttothecatalogdatabasecatdbasuserrman(whoownsthecatalogschema):

2.%rmanTARGET/CATALOGrman/cat@catdb

3.

4.Ifthetargetdatabaseisnotmounted,thenmountoropenit:

5.RMAN>STARTUPMOUNT;

6.

7.Registerthetargetdatabaseintheconnectedrecoverycatalog:

8.RMAN>REGISTERDATABASE;

9.

RMANcreatesrowsinthecatalogtablestocontaininformationaboutthetargetdatabase,thencopiesallpertinentdataaboutthetargetdatabasefromthecontrolfileintothecatalog,synchronizingthecatalogwiththecontrolfile.

VerifythattheregistrationwassuccessfulbyrunningREPORTSCHEMA:

RMAN>REPORTSCHEMA;

Reportofdatabaseschema

FileK-bytesTablespaceRBsegsDatafileName

--------------------------------------------------------

1307200SYSTEMNO/oracle/oradata/trgt/system01.dbf

220480UNDOTBSYES/oracle/oradata/trgt/undotbs01.dbf

310240CWMLITENO/oracle/oradata/trgt/cwmlite01.dbf

410240DRSYSNO/oracle/oradata/trgt/drsys01.dbf

510240EXAMPLENO/oracle/oradata/trgt/example01.dbf

610240INDXNO/oracle/oradata/trgt/indx01.dbf

710240TOOLSNO/oracle/oradata/trgt/tools01.dbf

810240USERSNO/oracle/oradata/trgt/users01.dbf

CatalogingOlderFilesintheRecoveryCatalog

Ifyouhavedatafilecopies,backuppiecesorarchivelogsondisk,youcancatalogthemintherecoverycatalogusingtheCATALOGcommand.Whenusingarecoverycatalog,catalogingolderbackupsthathaveagedoutofthecontrolfileletsRMANusetheolderbackupsduringrestoreoperations.Forexample:

RMAN>CATALOGDATAFILECOPY'/disk1/old_datafiles/01_01_2003/users01.dbf';

RMAN>CATALOGARCHIVELOG'/disk1/arch_logs/archive1_731.dbf',

'/disk1/arch_logs/archive1_732.dbf';

RMAN>CATALOGBACKUPPIECE'/disk1/backups/backup_820.bkp';

 

Youcanalsocatalogmultiplebackupfilesinadirectoryatonce,usingtheCATALOGSTARTWITHcommand,asshowninthisexample:

RMA

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

当前位置:首页 > 幼儿教育 > 育儿理论经验

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

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