Oracle 视图 DBA_FREE_SPACE 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图DBA_FREE_SPACE用于显示所有数据文件中空间划分,也就是所谓的“空间块”(space blocks),每个空间块代表一段空闲空间。该视图可以帮助DBA在管理数据的时候识别出某些数据文件的可用空间。
使用方法:
1. 启动SQL*Plus,界面显示为SQL>
2. 使用select子句查询DBA_FREE_SPACE视图来查看旧数据文件或者查看新的数据文件的可用空间:
SELECT FILE_NAME, BYTES FROM SYS.DBA_FREE_SPACE;
3. 执行上面的命令,就可以查看到各个数据文件还有多少可用空间,不同的数据文件可以有不同的可用空间,同一个数据文件也可能有不同的可用空间块。
官方英文解释
DBA_FREE_SPACE
describes the free extents 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_FREE_SPACE
describes the free extents in the tablespaces accessible to the current user.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
Name of the tablespace containing the extent |
|
|
|
Absolute file number of the data file containing the extent |
|
|
|
Starting block number of the extent |
|
|
|
Size of the extent (in bytes) |
|
|
|
Size of the extent (in Oracle blocks) |
|
|
|
Relative file number of the file containing the extent |
See Also:
“USER_FREE_SPACE”