14配置和使用恢复管理器

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Copyright©2010Oracle.Allrightsreserved.14.配置和使用恢复管理器2Copyright©2010,Oracle.Allrightsreserved.BackupandRecovery:ReviewThemajorbackupandrecovery–relatedtopicscoveredintheDatabaseAdministrationICourseare:•Typesoffailurethatcanhappen–Statement,session,instance,media,andsoon•HowtoconfigureARCHIVELOGmode•Howtoautomatebackups•Howtodoincrementalbackups•Howtoperformandtuneinstancerecovery3Copyright©2010,Oracle.Allrightsreserved.ServersessionChannelServersessionEnterpriseManagerRecoveryManagerComponentsTargetdatabaseRecoverycatalogdatabaseAuxiliarydatabaseDiskFlashrecoveryareaChannelChannelMMLOptionsRecoveryManager(RMAN)5Copyright©2010,Oracle.Allrightsreserved.StepsforConfiguringRMAN1.Determinetherepositorylocation:controlfileorrecoverycatalog.2.Definedatabaseandenvironmentvariables.3.StartRMANandconnecttothetargetand,optionally,therecoverycatalogdatabases.4.Configurepersistentsettings.6Copyright©2010,Oracle.Allrightsreserved.RMANRepositoryDataStorage:ComparisonofOptionsControlfile:–Simpleradministration–DefaultRecoverycatalog:–Replicatescontrolfiledata–Hasroomformoredata–Canservicemanytargets–CanstoreRMANscriptsMetadataBackupsetlistImagecopylist...8Copyright©2010,Oracle.Allrightsreserved.BackupDestinationsBackupscanbewrittento:•Diskdirectory•MediaManagementLibrary(tapedevice)–Typicallyusedfordisasterrecovery,whendiskbackupsarelost•Flashrecoveryarea–Thisisadiskareasetasideforbackupandrecoveryandflashbackdatabasepurposes.–Youdefinethelocationandthesize.–FilesareautomaticallynamedbyusingOracleManagedFiles.–Filesareautomaticallyretainedanddeletedasnecessary.9Copyright©2010,Oracle.Allrightsreserved.MediaManagementRecoveryManagerMediamanagementserversoftwareMediamanagementlibraryServersession(channel)OracleSecureBackupwithbuilt-inMMLOr11Copyright©2010,Oracle.Allrightsreserved.UsingaFlashRecoveryAreawithRMANYoucanconfigureRMANtousetheflashrecoveryarea.DatabaseareaRMANbackupprocessFlashrecoveryareaDB_RECOVERY_FILE_DEST='/u01/oracle/fra'DB_RECOVERY_FILE_DEST_SIZE=2G13Copyright©2010,Oracle.Allrightsreserved.MonitoringtheFlashRecoveryAreawithEM14Copyright©2010,Oracle.Allrightsreserved.FlashRecoveryAreaSpaceUsage•Configuretheretentionpolicytotheminimumvalueappropriateforyourdatabase.•Backupthearchivelogfilesregularlyanddeletethefilesuponcompletionofthebackup.•UsetheRMANREPORTOBSOLETEandDELETEOBSOLETEcommandstoremovebackupsandfilecopiesthatarenotrequired.15Copyright©2010,Oracle.Allrightsreserved.V$FLASH_RECOVERY_AREA_USAGEYoucanqueryV$FLASH_RECOVERY_AREA_USAGEtoviewtheflashrecoveryareadiskspaceusage.SQLSELECTfile_type,2percent_space_usedASused,3percent_space_reclaimableASreclaimable,4number_of_filesASnumber5FROMv$flash_recovery_area_usage;FILE_TYPEUSEDRECLAIMABLEFILES-------------------------------------------16Copyright©2010,Oracle.Allrightsreserved.V$FLASH_RECOVERY_AREA_USAGEOutputfromtheV$FLASH_RECOVERY_AREA_USAGEqueryFILE_TYPEUSEDRECLAIMABLEFILES-------------------------------------------CONTROLFILE000ONLINELOG000ARCHIVELOG69.130593BACKUPPIECE000IMAGECOPY000FLASHBACKLOG1.7703717Copyright©2010,Oracle.Allrightsreserved.BackingUptheFlashRecoveryAreaRMANBACKUPRECOVERYFILES;18Copyright©2010,Oracle.Allrightsreserved.BenefitsofUsingaFlashRecoveryAreaUsingtheflashrecoveryareaforrecovery-relatedfiles:•Simplifiesthelocationofdatabasebackups•Automaticallymanagesthediskspaceallocatedforrecoveryfiles•Doesnotrequirechangestoexistingscripts•Putsdatabasebackups,archivelogs,andcontrolfilebackupsintheflashrecoveryarea19Copyright©2010,Oracle.Allrightsreserved.SettingParametersThatAffectRMAN•Databaseinitializationparameters–CONTROL_FILE_RECORD_KEEP_TIME–DB_RECOVERY_FILE_DESTandDB_RECOVERY_FILE_DEST_SIZE,ifusingtheflashrecoveryarea•Environmentvariables–NLS_DATE_FORMAT–NLS_LANG21Copyright©2010,Oracle.Allrightsreserved.RMANUsageConsiderations•Resources:Sharedmemory,moreprocesses•Privilegesgiventousers:–Database:SYSDBA–Operatingsystem:Accesstodevices•Remoteoperations:–Setupthepasswordfile–Ensurethatthepasswordfileisbackedup22Copyright©2010,Oracle.Allrightsreserved.ConnectionTypeswithRMANTargetdatabaseRecoverycatalogDBAuxiliarydatabaseRecoveryManager23Copyright©2010,Oracle.Allrightsreserved.StartingRMAN•StartingRMANlocally•StartingRMANremotelyUNIX:$ORACLE_SID=DB01;exportORACLE_SID$rmantarget/rmantargetsys/password@DB01WindowsNT:C:\setORACLE_SID=DB01C:\rmantarget/24Copyright©2010,Oracle.Allrightsreserved.AdditionalRMANCommand-LineArguments•WritingRMANoutputtoalogfile•ExecutingacommandfilewhenRMANisinvoked•EstablishingdatabaseconnectionsonRMANstartup$rmanTARGETsys/oracleCMDFILE=$HOME/scripts/my_rman_script.rcv$rmanTARGETsys/oracleLOG=$HOME/oradata/u03/rman.logAPPEND$rmanTARGETSYS/sys_pwd@orclCATALOGrman/rman@rcat25Copyright©2010,Oracle.Allrightsreserved.ConfiguringRMANSettingsbyUsingEM26Copyright©2010,Oracle.Allrightsreserved.ControlFileAutobackupsRMANCONFIGURECONTROLFILEAUTOBACKUPON;Bestpractice:Oraclerecommendsthatyouenablecontrolfileautobackup.28Copyright©2010,Oracle.Allrightsreserved.•Aretentionpolicydescribeswhichbackupswillbekeptandforhowlo

1 / 53
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功