--检查表空间使用情况
SELECT f.tablespace_name
, a.total "total (M)"
, f.free "free (M)"
, ROUND ( (f.free / a.total) * 100) "% Free"
FROM ( SELECT tablespace_name, SUM (bytes / (1024 * 1024)) total
FROM dba_data_files
GROUP BY tablespace_name) a
, ( SELECT tablespace_name, ROUND (SUM (bytes / (1024 * 1024))) free
FROM dba_free_space
GROUP BY tablespace_name) f
WHERE a.tablespace_name = f.tablespace_name(+)
ORDER BY "% Free";