keep track of their free and used space:
■ Locally managed tablespaces: Extent management by the tablespace
■ Dictionary managed tablespaces: Extent management by the data dictionary
When you create a tablespace, you choose one of these methods of space management.
Later, you can change the management method with the DBMS_SPACE_ADMIN
PL/SQL package.
表空间分配空间使用区块。表空间可以使用2种方法去跟踪他们空闲和使用的空间:
#本地管理表空间:区块管理通过表空间
#数据字典管理表空间:区块管理管理通过数据字典
当你创建一个表空间,你选择其中的一个空间管理模式后,你可以改变管理的方法通过使用
DBMS_SPACE_ADMIN PL/SQL包。
Note: If you do not specify extent management when you create a
tablespace, then the default is locally managed.
备注:如果你不指定区块管理,当你创建一个表空间时,那么默认的默认的表空间的采用本地管理。
Locally Managed Tablespaces
A tablespace that manages its own extents maintains a bitmap in each datafile to keep
track of the free or used status of blocks in that datafile. Each bit in the bitmap
corresponds to a block or a group of blocks. When an extent is allocated or freed for
reuse, Oracle changes the bitmap values to show the new status of the blocks. These
changes do not generate rollback information because they do not update tables in the
data dictionary (except for special cases such as tablespace quota information).
Locally managed tablespaces have the following advantages over dictionary managed
tablespaces:
本地管理表空间
表空间维护一个位图管理它们自己的区块在每一个数据文件去跟踪在数据文件中块的
空闲和使用的状态。每个位在位图中对应一个块或者一组块。当一个区块分配或者可
重用的空闲块,ORACLE修改位图值显示块的新状态。这些修改不会产生回滚信息因
为他们不会在数据字典中更新表(除了特殊情况如表空间分配信息).本地管理表空间有
以下优点对比于数据字典管理表空间:
■ Local management of extents automatically tracks adjacent free space, eliminating
the need to coalesce free extents.
#本地区块管理自动跟踪相邻空闲块,不需合并空闲块。
■ Local management of extents avoids recursive space management operations.
Such recursive operations can occur in dictionary managed tablespaces if
consuming or releasing space in an extent results in another operation that
consumes or releases space in a data dictionary table or rollback segment.
#本地区块管理避免了递归空间管理操作。这些递归操作可以发生在数据字典管理表空间。
如果使用或释放空间通过一个区块这样会导致另一个使用或者释放空间的操作在数据字典表
或者回滚段中。
The sizes of extents that are managed locally can be determined automatically by the
system. Alternatively, all extents can have the same size in a locally managed
tablespace and override object storage options.
本地管理的区块大小将自动决定通过信息。另外,所有的区块可以拥有相同的大小在本
地管理的表空间并且它优先于数据的存储选项。
The LOCAL clause of the CREATE TABLESPACE or CREATE TEMPORARY TABLESPACE
statement is specified to create locally managed permanent or temporary tablespaces,
respectively.
LOCAL语句在CREATE TABLESPACE 或者CREATE TEMPORARY TABLESPACE语句是被
指定去创建本地管理永久或者临时表空间,各自地;
Segment Space Management in Locally Managed Tablespaces
When you create a locally managed tablespace using the CREATE TABLESPACE
statement, the SEGMENT SPACE MANAGEMENT clause lets you specify how free and
used space within a segment is to be managed. Your choices are:
段空间管理在本地管理表空间,当你创建一个本地管理表空间使用CREATE TABLESPACE语
句,SEGMENT SPACE MANAGEMENT语句让你指定怎样释放和使用空间在一个段中。你可以
选择如下:
■ AUTO
This keyword tells Oracle that you want to use bitmaps to manage the free space
within segments. A bitmap, in this case, is a map that describes the status of each
data block within a segment with respect to the amount of space in the block
available for inserting rows. As more or less space becomes available in a data
block, its new state is reflected in the bitmap. Bitmaps enable Oracle to manage
free space more automatically; thus, this form of space management is called
automatic segment-space management.
#自动
这个关键字告诉ORACLE你想使用位图去管理空闲空间在段中。一个位图,在这种情
况下,它是一个描述在一个段中的可用于插入行的数据块的空间数量地图。或多或少的
空间会变得可用在一个数据块中,它的新状态直接反应在位图中。位图允许ORACLE管理
空闲空间更自动化的;这样的话,这种空间管理模式被称为自动段空间管理。
Locally managed tablespaces using automatic segment-space management can be
created as smallfile (traditional) or bigfile tablespaces. AUTO is the default.
本地管理表空间使用自动段空管理可以用小文件(传统)或者大文件表空间,默认是
是自动模式。
■ MANUAL
This keyword tells Oracle that you want to use free lists for managing free space
within segments. Free lists are lists of data blocks that have space available for
inserting rows.
#手动
这个关键词告诉ORACLE你想使用FREE LISTS管理空闲空间在段中。FREE LISTS是
一个数据块的列表它拥有可以用于插入行的可用空间。
Dictionary Managed Tablespaces
If you created your database with an earlier version of Oracle, then you could be using
dictionary managed tablespaces. For a tablespace that uses the data dictionary to
manage its extents, Oracle updates the appropriate tables in the data dictionary
whenever an extent is allocated or freed for reuse. Oracle also stores rollback
information about each update of the dictionary tables. Because dictionary tables and
rollback segments are part of the database, the space that they occupy is subject to the
same space management operations as all other data.
数据字典管理表空间
如果你创建数据库它是更早的版本,那你可以使用数据字典管理表空间。对于使用数据
字典的表空间去管理它的区块,ORACLE更新适当表在数据字典当一个区块分配或者释放
或者重用。ORACLE 也存储回滚信息关于每个更新数据字典表的信息。因为数据字典表和回
滚段是数据库的一部份,它们占有的空间也遵从于同样的空间管理操作和其它的数据一样;