可以通过以下 SQL 查询表空间使用情况:

SELECT tablespace_name,
       sum(bytes) / 1024 / 1024 AS total_size_mb,
       sum(bytes - decode(maxbytes, 0, bytes, maxbytes)) / 1024 / 1024 AS used_size_mb,
       sum(decode(maxbytes, 0, bytes, maxbytes)) / 1024 / 1024 AS max_size_mb,
       round((1 - sum(bytes - decode(maxbytes, 0, bytes, maxbytes)) / sum(decode(maxbytes, 0, bytes, maxbytes))) * 100, 2) AS used_pct
FROM dba_data_files
GROUP BY tablespace_name;

该查询会返回表空间名、总大小、已使用大小、最大大小、使用百分比等信息。其中,'used_size_mb' 表示已使用大小,'max_size_mb' 表示最大大小,'used_pct' 表示已使用百分比。