看每个tablespace的free space(extents)
SELECT tablespace_name "TABLESPACE",
file_id,
COUNT(*) "PIECES",
MAX(blocks) "MAXIMUM",
MIN(blocks) "MINIMUM",
AVG(blocks) "AVERAGE",
SUM(blocks) "TOTAL"
FROM sys.dba_free_space GROUP BY tablespace_name, file_id;
PS:TOTAL shows the amount of free space in each tablespace, PIECES shows the amount of fragmentation in the datafiles of the tablespace, and MAXIMUM shows the largest contiguous area of space. This query is useful when you are going to create a new object or you know that a segment is about to extend, and you want to make sure that there is enough space in the containing tablespace.
经常查看空间大小是每个DBA每天应该做的事情,当发现异常情况后,应该马上增加DATA FILES或扩展DATA FILES的大小。
come from:http://www.jiafangyifang.com/news/newsdata/2001_07_23/4/2001072391852.htm
SELECT tablespace_name "TABLESPACE",
file_id,
COUNT(*) "PIECES",
MAX(blocks) "MAXIMUM",
MIN(blocks) "MINIMUM",
AVG(blocks) "AVERAGE",
SUM(blocks) "TOTAL"
FROM sys.dba_free_space GROUP BY tablespace_name, file_id;
PS:TOTAL shows the amount of free space in each tablespace, PIECES shows the amount of fragmentation in the datafiles of the tablespace, and MAXIMUM shows the largest contiguous area of space. This query is useful when you are going to create a new object or you know that a segment is about to extend, and you want to make sure that there is enough space in the containing tablespace.
经常查看空间大小是每个DBA每天应该做的事情,当发现异常情况后,应该马上增加DATA FILES或扩展DATA FILES的大小。
come from:http://www.jiafangyifang.com/news/newsdata/2001_07_23/4/2001072391852.htm
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/90618/viewspace-663218/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/90618/viewspace-663218/