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

本站中文解释

DBA_DATA_FILES视图用于存储数据库文件信息,包括每个数据文件的大小,路径,块大小,是否只读,是否存在碎片等信息。这个视图可以让用户把数据库中所有表空间关联到文件上,以及方便管理和使用文件。

使用方法:首先用户可以查询DBA_DATA_FILES视图,查看所有的数据库文件,然后按照需求把数据文件以及表空间进行关联,经常可以把文件和表空间进行关联,以及把表空间的大小调整等。此外,用户还可以在视图中查看每个数据文件的大小,路径,块大小,是否只读,是否存在碎片等信息。

官方英文解释

DBA_DATA_FILES describes database files.

Note:

When you query the DBA_DATA_FILES data dictionary view, Oracle must have access to all tablespaces and their data files if the requested information is not already available in the dictionary. If the tablespaces are encrypted, then you must open the Oracle wallet (keystore) before you can query DBA_DATA_FILES. You can use the ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN statement to open the keystore.

Column Datatype NULL Description

FILE_NAME

VARCHAR2(513)

Name of the database file

FILE_ID

NUMBER

Absolute file number of the database file

TABLESPACE_NAME

VARCHAR2(30)

Name of the tablespace to which the file belongs

BYTES

NUMBER

Size of the file in bytes

BLOCKS

NUMBER

Size of the file in Oracle blocks

STATUS

VARCHAR2(9)

File status: AVAILABLE or INVALID (INVALID means that the file number is not in use, for example, a file in a tablespace that was dropped)

RELATIVE_FNO

NUMBER

Relative file number

AUTOEXTENSIBLE

VARCHAR2(3)

Autoextensible indicator

MAXBYTES

NUMBER

Maximum file size in bytes

MAXBLOCKS

NUMBER

Maximum file size in blocks

INCREMENT_BY

NUMBER

Number of Oracle blocks used as autoextension increment

USER_BYTES

NUMBER

The size of the file available for user data. The actual size of the file minus the USER_BYTES value is used to store file related metadata.

USER_BLOCKS

NUMBER

Number of blocks which can be used by the data

ONLINE_STATUS

VARCHAR2(7)

Online status of the file:

  • SYSOFF

  • SYSTEM

  • OFFLINE

  • ONLINE

  • RECOVER

LOST_WRITE_PROTECT

VARCHAR2(7)

Lost write protection status of the file. Possible values:

  • ENABLED: Indicates that lost write data is being collected

  • OFF: Indicates that lost write data is not being collected

  • SUSPEND: Indicates that lost write data is not currently being collected, but it can be enabled at a later date. The lost write data collected when the file was ENABLED remains in the lost write database, but it is not being checked or updated.

If lost write protection is enabled for a single data file, it does not have to be enabled for another data file in the same tablespace.

If lost write protection is enabled for a tablespace, it is enabled for all data files for that tablespace, including data files added later.

You can check the lost write protection status for a tablespace by querying the LOST_WRITE_PROTECT column in the DBA_TABLESPACES view.

See Also:

  • Oracle Database Advanced
    Security Guide
    for information on opening a software keystore

  • Oracle Database Advanced
    Security Guide
    for information on opening a hardware keystore

  • “DBA_TABLESPACES”


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