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

本站中文解释

Oracle视图DBA_TABLESPACE_USAGE_METRICS用来收集各个表空间的使用情况,可以根据它来分析表空间的使用状况。

它返回几个字段,它们分别描述表空间的使用情况,如表空间的用户空间百分比(TABLESPACE_USED_PERCENT)、最大可用空间(MAX_SPACE_AVAILABLE)、已分配空间(ALLOCATED_SPACE)以及可选参数PERCENT_SPACE_RECLAIMABLE(可回收空间百分比)等等。

使用方法:

可以使用以下查询查看DBA_TABLESPACE_USAGE_METRICS中的信息。

SELECT TABLESPACE_NAME,
TABLESPACE_USED_PERCENT,
MAX_SPACE_AVAILABLE,
ALLOCATED_SPACE,
PERCENT_SPACE_RECLAIMABLE
FROM DBA_TABLESPACE_USAGE_METRICS;

官方英文解释

DBA_TABLESPACE_USAGE_METRICS describes tablespace usage metrics for all types of tablespaces, including permanent, temporary, and undo tablespaces.

Column Datatype NULL Description

TABLESPACE_NAME

VARCHAR2(30)

Tablespace name

USED_SPACE

NUMBER

Total space consumed by the tablespace, in database blocks

For undo tablespaces, the value of this column includes space consumed by both expired and unexpired undo segments.

TABLESPACE_SIZE

NUMBER

Tablespace size, in database blocks

  • If the tablespace contains any datafiles with autoextend enabled, then this column displays the amount of underlying storage free space for the tablespace. For example, if the current tablespace size is 1 GB, the combined maximum size of all of its datafiles is 32 GB, and its underlying storage (for example, ASM or file system storage) has 20 GB of free space, then this column will have a value of approximately 20 GB.

  • If the tablespace contains only datafiles with autoextend disabled, then this column displays the allocated space for the entire tablespace, that is, the combined size of all datafiles in the tablespace. Datafile size can be obtained by querying the BLOCKS column of the DBA_DATA_FILES view.

USED_PERCENT

NUMBER

Percentage of used space, as a function of the maximum possible tablespace size


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