查看oracle中各个表空间的已使用空间和最大分配空间
SELECT t.NAME "TABLESPACE_NAME",
SUM(u.ALLOCATED_SPACE) * 8 / 1000 "USED_SPACE(M)",
SUM(u.FILE_MAXSIZE) * 8 / 1000 "MAX_SIZE(M)"
FROM v$filespace_usage u, v$tablespace t
WHERE u.TABLESPACE_ID = t.TS#
GROUP BY t.NAME;
SELECT t.NAME "TABLESPACE_NAME",
SUM(u.ALLOCATED_SPACE) * 8 / 1000 "USED_SPACE(M)",
SUM(u.FILE_MAXSIZE) * 8 / 1000 "MAX_SIZE(M)"
FROM v$filespace_usage u, v$tablespace t
WHERE u.TABLESPACE_ID = t.TS#
GROUP BY t.NAME;