ORACLE EXTENT MANAGEMENT和SEGMENT MANAGEMENT

extent_management_clause

The extent_management_clause lets you specify how the extents of the tablespace will be managed.

Note:

After you have specified extent management with this clause, you can change extent management only by migrating the tablespace.
  • Specify LOCAL if you want the tablespace to be locally managed. Locally managed tablespaces have some part of the tablespace set aside for a bitmap. This is the default for permanent tablespaces. Temporary tablespaces are always automatically created with locally managed extents.

    • AUTOALLOCATE specifies that the tablespace is system managed. Users cannot specify an extent size. You cannot specify AUTOALLOCATE for a temporary tablespace.

    • UNIFORM specifies that the tablespace is managed with uniform extents of SIZE bytes.The default SIZE is 1 megabyte. All extents of temporary tablespaces are of uniform size, so this keyword is optional for a temporary tablespace. However, you must specify UNIFORM in order to specify SIZE . You cannot specify UNIFORM for an undo tablespace.

  • Specify DICTIONARY if you want the tablespace to be managed using dictionary tables.

Restriction on Dictionary-managed Tablespaces  You cannot specify DICTIONARY if the SYSTEM tablespace of the database is locally managed or if you have specified the temporary_tablespace_clause .

Note:

Oracle strongly recommends that you create only locally managed tablespaces. Locally managed tablespaces are much more efficiently managed than dictionary-managed tablespaces. The creation of new dictionary-managed tablespaces is scheduled for desupport.

If you do not specify the extent_management_clause , then Oracle Database interprets the MINIMUM EXTENT clause and the DEFAULT storage_clause to determine extent management.

  • If you do not specify the DEFAULT storage_clause , then the database creates a locally managed autoallocated tablespace.

  • If you did specify the DEFAULT storage_clause , then:

    • If you specified the MINIMUM EXTENT clause, then the database evaluates whether the values of MINIMUM EXTENT , INITIAL , and NEXT are equal and the value of PCTINCREASE is 0. If they are equal, then the database creates a locally managed uniform tablespace with extent size = INITIAL . If the MINIMUM EXTENT , INITIAL , and NEXT parameters are not equal, or if PCTINCREASE is not 0, then the database ignores any extent storage parameters you may specify and creates a locally managed, autoallocated tablespace.

    • If you did not specify MINIMUM EXTENT clause, then the database evaluates only whether the storage values of INITIAL and NEXT are equal and PCTINCREASE is 0. If they are equal, then the tablespace is locally managed and uniform. Otherwise, the tablespace is locally managed and autoallocated.

Restrictions on Extent Management  Extent management is subject to the following restrictions:

  • A permanent locally managed tablespace can contain only permanent objects. If you need a locally managed tablespace to store temporary objects, for example, if you will assign it as a user's temporary tablespace, then use the temporary_tablespace_clause .

  • If you specify LOCAL , then you cannot specify DEFAULT storage_clause, MINIMUM EXTENT , or the temporary_tablespace_clause .

===================================================================================

segment_management_clause

The segment_management_clause is relevant only for permanent, locally managed tablespaces. It lets you specify whether Oracle Database should track the used and free space in the segments in the tablespace using free lists or bitmaps. This clause is not valid for a temporary tablespace.

AUTO   Specify AUTO if you want the database to manage the free space of segments in the tablespace using a bitmap. If you specify AUTO , then the database ignores any specification for PCTUSED , FREELIST , and FREELIST GROUPS in subsequent storage specifications for objects in this tablespace. This setting is called automatic segment-space management and is the default.

MANUAL  Specify MANUAL if you want the database to manage the free space of segments in the tablespace using free lists. Oracle strongly recommends that you do not use this setting and that you create tablespaces with automatic segment-space management.

To determine the segment management of an existing tablespace, query the SEGMENT_SPACE_MANAGEMENT column of the DBA_TABLESPACES or USER_TABLESPACES data dictionary view.

Notes:

If you specify AUTO segment management, then:
  • If you set extent management to LOCAL UNIFORM , then you must ensure that each extent contains at least 5 database blocks.

  • If you set extent management to LOCAL AUTOALLOCATE , and if the database block size is 16K or greater, then Oracle manages segment space by creating extents with a minimum size of 5 blocks rounded up to 64K.

Restrictions on Automatic Segment-space Management  This clause is subject to the following restrictions:

  • You can specify this clause only for a permanent, locally managed tablespace.

  • You cannot specify this clause for the SYSTEM tablespace.

 

展开阅读全文

extent management dictionary/local

05-01

create tablespace jinlianrndatafile 'h:\tablespace\jinlian.dbf' size 10mrnminimum extent 50krnextent management dictionaryrndefault storage( initial 50k next 50k maxextents 100 pctincrease 0)rn/rnrnrnrn创建数据字典管理表空间失败!google了一下 发现说rnORA-12913: Cannot create dictionary managed tablespace rnCause: Attemp to create dictionary managed tablespace in database which has system tablespace as locally managedrn rnAction: Create a locally managed tablespace.rn rnrnsystem表空间时local管理的 所以创建数据字典管理表空间失败 rnrnrn但是我查了一下官方文档说rnrnYou cannot specify DICTIONARY if the SYSTEM tablespace of the database is locally managed or if you have specified the temporary_tablespace_clause.rn你不能描述一个数据字典管理表空间 如果你的system 时local管理的时候 或者 你想要创建一个临时表空间rnrnrnIf you do not specify the extent_management_clause, then Oracle Database interprets the MINIMUM EXTENT clause and the DEFAULT storage_clause to determine extent managementrnrnIf you do not specify the DEFAULT storage_clause, then the database creates a locally managed autoallocated tablespacernrn如果你不描述 default 存储设置时 数据库将创建local管理的表空间rnrnIf you did specify the DEFAULT storage_clause, then:rnrnIf you specified the MINIMUM EXTENT clause, then the database evaluates whether the values of MINIMUM EXTENT, INITIAL, and NEXT are equal and the value of PCTINCREASE is 0. If they are equal, then the database creates a locally managed uniform tablespace with extent size = INITIAL. If the MINIMUM EXTENT, INITIAL, and NEXT parameters are not equal, or if PCTINCREASE is not 0, then the database ignores any extent storage parameters you may specify and creates a locally managed, autoallocated tablespace.rnrnIf you did not specify MINIMUM EXTENT clause, then the database evaluates only whether the storage values of INITIAL and NEXT are equal and PCTINCREASE is 0. If they are equal, then the tablespace is locally managed and uniform. Otherwise, the tablespace is locally managed and autoallocated.rnrnrnRestrictions on Extent Managementrn rnExtent management is subject to the following restrictions:rnrnA permanent locally managed tablespace can contain only permanent objects. If you need a locally managed tablespace to store temporary objects, for example, if you will assign it as a user's temporary tablespace, then use the temporary_tablespace_clause.rnrnIf you specify LOCAL, then you cannot specify DEFAULT storage_clause, MINIMUM EXTENT, or the temporary_tablespace_clause ------------重点rnrnrn我的理解是 如果设置default storage 的话 那么就可以创建extent management dictionary 否则就不行。rnrn请问问时这样的么rnrn如果不是rnrn那么想创建extent management dictionary 该如何。rn 论坛

没有更多推荐了,返回首页