您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 冶金工业 > 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
本文标题:14配置和使用恢复管理器
链接地址:https://www.777doc.com/doc-311766 .html