SELECT
a.tablespace_name 表空间名称,
total 总计,
total - free 已使用,
free 空闲,
round((total - free) / total * 100, 2) 使用占比
FROM (
SELECT tablespace_name
, round(SUM(bytes) / 1024 / 1024) AS total
FROM dba_data_files
GROUP BY tablespace_name
) a
LEFT JOIN (
SELECT tablespace_name
, round(SUM(bytes) / 1024 / 1024) AS free
FROM dba_free_space
GROUP BY tablespace_name
) b
ON a.tablespace_name = b.tablespace_name
ORDER BY (total - free) / total DESC;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2021-06-26
  • 2021-05-21
猜你喜欢
  • 2022-12-23
  • 2021-11-19
  • 2022-01-21
  • 2021-12-30
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案