吉林大学大型数据库设计与实现dba-08.ppt
ManagingTablespacesandDataFiles
ObjectivesAftercompletingthislesson,youshouldbeabletodothefollowing:DescribethelogicalstructureofthedatabaseCreatetablespacesChangethesizeoftablespacesAllocatespacefortemporarysegmentsChangethestatusoftablespacesChangethestoragesettingsoftablespacesImplementOracleManagedFiles
OverviewControlfilesDatafilesRedologfilesDatabase
DatabaseLogicalPhysicalTablespaceDatafileOSblockOracle
blockSegmentExtentDatabaseStorageHierarchy
SYSTEMandNon-SYSTEMTablespacesSYSTEMtablespace:CreatedwiththedatabaseContainsthedatadictionaryContainstheSYSTEMundosegmentNon-SYSTEMtablespaces:SeparatesegmentsEasespaceadministrationControlamountofspaceallocatedtoauser
CreatingTablespacesCREATETABLESPACEuserdata DATAFILE/u01/oradata/userdata01.dbfSIZE100MAUTOEXTENDONNEXT5MMAXSIZE200M;
SpaceManagementinTablespacesLocallymanagedtablespaces:FreeextentsrecordedinbitmapEachbitcorrespondstoablockorgroupofblocksBitvalueindicatesfreeorusedDictionary-managedtablespaces:DefaultmethodFreeextentsrecordedindatadictionarytables
LocallyManagedTablespacesReducedcontentionondatadictionarytablesNoundogeneratedwhenspaceallocationordeallocationoccursNocoalescingrequiredCREATETABLESPACEuserdataDATAFILE/u01/oradata/userdata01.dbfSIZE500MEXTENTMANAGEMENTLOCALUNIFORMSIZE256K;
DictionaryManagedTablespacesExtentsaremanagedinthedatadictionaryEachsegmentstoredinthetablespacecanhaveadifferentstorageclauseCoalescingrequiredCREATETABLESPACEuserdataDATAFILE/u01/oradata/userdata01.dbfSIZE500MEXTENTMANAGEMENTDICTIONARY DEFAULTSTORAGE(initial1MNEXT1M);
ChangingtheStorageSettingsALTERTABLESPACEuserdataMINIMUMEXTENT2M;ALTERTABLESPACEuserdataDEFAULTSTORAGE(INITIAL 2MNEXT 2MMAXEXTENTS 999);
UndoTablespaceUsedtostoreundosegmentsCannotcontainanyotherobjectsExtentsarelo