显示表空间内容的命令是什么?

时间:2015-03-03 22:08:11

标签: sql database oracle dll

显示表空间内容的命令是什么?

Oracle,dll

2 个答案:

答案 0 :(得分:1)

SELECT TABLESPACE_NAME "TABLESPACE",
   INITIAL_EXTENT "INITIAL_EXT",
   NEXT_EXTENT "NEXT_EXT",
   MIN_EXTENTS "MIN_EXT",
   MAX_EXTENTS "MAX_EXT",
   PCT_INCREASE
   FROM DBA_TABLESPACES;

如果您想了解可用空间,可以使用以下内容:

SELECT TABLESPACE_NAME "TABLESPACE", FILE_ID,
   COUNT(*)    "PIECES",
   MAX(blocks) "MAXIMUM",
   MIN(blocks) "MINIMUM",
   AVG(blocks) "AVERAGE",
   SUM(blocks) "TOTAL"
   FROM DBA_FREE_SPACE
GROUP BY TABLESPACE_NAME, FILE_ID;

取自here

答案 1 :(得分:1)

显示驻留在表空间中的段

SELECT owner, 
       segment_name,
       partition_name,
       segment_type,
       bytes
  FROM dba_segments
 WHERE tablespace_name = 'NAME_OF_TABLESPACE'