查询ORACLE用户表空间使用情况的SQL语句 约定不等于承诺〃 2022-02-20 05:47 269阅读 0赞 select t.tablespace\_name, round(t.bytes / 1024 / 1024 / 1024, 2) || 'G' "总大小", round((t.bytes - f.bytes) / 1024 / 1024 / 1024, 2) || 'G' "已使用", round(100 \* (t.bytes - f.bytes) / t.bytes, 2) || '%' "使用率" from (select tablespace\_name, sum(bytes) bytes from dba\_data\_files group by tablespace\_name) t, (select tablespace\_name, sum(bytes) bytes from dba\_free\_space group by tablespace\_name) f where f.tablespace\_name(+) = t.tablespace\_name
还没有评论,来说两句吧...