oracle查询数据库占用大小
查询表咋用大小
SELECT
SUM(bytes)/1024/1024/1024 AS GB
FROM
dba_segments
WHERE
segment_type = 'TABLE';
查询所有文件占用大小
SELECT
ROUND(SUM(bytes) / 1024 / 1024 / 1024, 2) AS "Size in GB"
FROM
dba_data_files;
查询每个表空间大小
SELECT
tablespace_name,
ROUND(SUM(bytes) / 1024 / 1024 / 1024, 2) AS "Size in GB"
FROM
dba_data_files
GROUP BY
tablespace_name;
参考文章