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

本站中文解释

V$TEMP_SPACE_HEADER视图显示临时表空间的信息。它是这些视图(V$TABLESPACE、V$TEMPFILE、V$TEMP_SPACE_USAGE和V$SESSION)的综合,V$TEMP_SPACE_HEADER视图收集有关当前临时表空间暂用情况的信息。

使用方法:

1、查询临时表空间的使用情况:

SELECT TABLESPACE_NAME, USED_BLOCKS, FREE_BLOCKS, MAX_BLOCKS
FROM V$TEMP_SPACE_HEADER;

2、查看当前活动会话的临时表空间使用情况:

SELECT b.TABLESPACE_NAME,
b.USED_BLOCKS,
b.FREE_BLOCKS,
b.MAX_BLOCKS
FROM V$TEMP_SPACE_HEADER b, V$SESSION s
WHERE s.TEMPORARY_TABLESPACE = b.TABLESPACE_NAME;

官方英文解释

V$TEMP_SPACE_HEADER displays aggregate information per file per LOCALLY MANAGED temporary tablespace regarding how much space is currently being used and how much is free as identified in the space header.

Column Datatype NULL Description

TABLESPACE_NAME

VARCHAR2(30)

NOT NULL

Name of the temporary tablespace

FILE_ID

NUMBER

Absolute file number

BYTES_USED

NUMBER

How many bytes are in use

BLOCKS_USED

NUMBER

How many blocks are in use

BYTES_FREE

NUMBER

How many bytes are free

BLOCKS_FREE

NUMBER

How many blocks are free

RELATIVE_FNO

NUMBER

The relative file number for the file

CON_ID

NUMBER

The ID of the container to which the data pertains. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data


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