查看表空间使用情况
SELECT A.TABLESPACE_NAME "表空间名",
TOTAL / 1024 / 1024 "表空间大小单位M",
FREE / 1024 / 1024 "表空间剩余大小单位M",
(TOTAL - FREE) / 1024 / 1024 "表空间使用大小单位M",
ROUND((TOTAL - FREE) / TOTAL, 4) * 100 "使用率 [[%]]"FROM
(SELECT TABLESPACE_NAME, SUM(BYTES) FREE
FROM DBA_FREE_SPACE
GROUP BY TABLESPACE_NAME) A,
(SELECT TABLESPACE_NAME,
SUM(BYTES) TOTAL
FROM DBA_DATA_FILES
GROUP BY TABLESPACE_NAME) B WHERE A.TABLESPACE_NAME = B.TABLESPACE_NAME;