Oracle 视图 DBA_EXTENTS 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图DBA_EXTENTS是数据库管理者可以查看每个表空间的每个数据文件的有关信息。比如每个表空间每个数据文件包含多少个扩展,哪些扩展具有可用空间,每个扩展又包含多少个数据块等。用户可以通过使用Oracle视图DBA_EXTENTS来跟踪表空间使用情况,并识别哪些可以被回收空间。

不同版本的Oracle数据库可能包含大量不同的视图以查看各种细节。如果要访问DBA_EXTENTS视图,则需要拥有SYSDBA或SYSOPER权限的帐户,以运行以下查询:

SELECT * FROM DBA_EXTENTS;

这将返回一个小表,其中包括所有表空间和数据文件的扩展信息。 用户可以在此基础上进行更高级的查询,例如确定哪些表空间具有最大存储空间,或者确定哪些有可用空间可回收。

官方英文解释

DBA_EXTENTS describes the extents comprising the segments in all tablespaces in the database.

Note that if a data file (or entire tablespace) is offline in a locally managed tablespace, you will not see any extent information. If an object has extents in an online file of the tablespace, you will see extent information about the offline data file. However, if the object is entirely in the offline file, a query of this view will not return any records.

Related View

USER_EXTENTS describes the extents comprising the segments owned by the current user’s objects. This view does not display the OWNER, FILE_ID, BLOCK_ID, or RELATIVE_FNO columns.

Column Datatype NULL Description

OWNER

VARCHAR2(128)

Owner of the segment associated with the extent

SEGMENT_NAME

VARCHAR2(128)

Name of the segment associated with the extent

PARTITION_NAME

VARCHAR2(128)

Object Partition Name (Set to NULL for nonpartitioned objects)

SEGMENT_TYPE

VARCHAR2(18)

Type of the segment: INDEX PARTITION, TABLE PARTITION

TABLESPACE_NAME

VARCHAR2(30)

Name of the tablespace containing the extent

EXTENT_ID

NUMBER

Extent number in the segment

FILE_ID

NUMBER

Absolute file number of the data file containing the extent

BLOCK_ID

NUMBER

Starting block number of the extent

BYTES

NUMBER

Size of the extent in bytes

BLOCKS

NUMBER

Size of the extent in Oracle blocks

RELATIVE_FNO

NUMBER

Relative file number of the first extent block

See Also:

“USER_EXTENTS”


数据运维技术 » Oracle 视图 DBA_EXTENTS 官方解释,作用,如何使用详细说明