吉林大学大型数据库设计与实现dba-10.ppt
ManagingUndoData
ObjectivesAftercompletingthislesson,youshouldbeabletodothefollowing:DescribethepurposeofundodataImplementAutomaticUndoManagementCreateandconfigureundosegmentsObtainundosegmentinformationfromthedatadictionary
ManagingUndoDataOverviewTwomethodsformanagingundodataexistsAutomaticUndoManagementManualUndoManagementThislessondiscussesAutomaticUndoManagementThetermundoreplaceswhatwasknowninpreviousversionsofOracleasrollback
UndoSegmentUpdatetransactionOldimageNewimageUndosegmentTable
UndoSegments:PurposeTransactionrollbackTransactionrecoveryUndosegmentReadconsistency
ReadConsistencyImageatstartofstatementNewimageTableSELECT*
FROMtable
TypesofUndoSegmentsSYSTEM:UsedforobjectsintheSYSTEMtablespaceNon-SYSTEM:Usedforobjectsinothertablespaces:AutoMode:RequiresanUNDOtablespaceManualMode:Private:AcquiredbyasingleinstancePublic:AcquiredbyanyinstanceDeferred:Usedwhentablespacesaretakenofflineimmediate,temporary,orforrecovery
AutomaticUndoManagement:
ConceptsUndodataismanagedusinganUNDOtablespaceYouallocateoneUNDOtablespaceperinstancewithenoughspacefortheworkloadoftheinstance.TheOracleserverautomaticallymaintainsundodatawithintheUNDOtablespace.
AutomaticUndoManagement:
ConfigurationConfiguretwoparametersintheinitializationfile:UNDO_MANAGEMENTUNDO_TABLESPACECreateatleastoneUNDOtablespace.Initializationfileundo1db01.dbfUNDOTablespace
AutomaticUndoManagement:
InitializationParametersUNDO_MANAGEMENT:SpecifieswhetherthesystemshoulduseAUTOorMANUALmode.UNDO_TABLESPACE:SpecifiesaparticularUNDOtablespacetobeused.UNDO_MANAGEMENT=AUTOUNDO_TABLESPACE=UNDOTBS
AutomaticUndoManagement:
UNDOTablespaceYoumaycreatetheUNDOtablespacewiththedatabasebyaddingaclauseintheCREATEDATABASEcommandOrcreateitlaterbyusingtheCREATEUNDOTABLESPACEcommandCREATEDATABASEdb01...U