查看表空间使用情况
SELECT a.tablespace_name,
ROUND (a.total_size) "total_size(MB)",
ROUND (a.total_size) - ROUND (b.free_size, 3) "used_size(MB)",
ROUND (b.free_size, 3) "free_size(MB)",
ROUND (b.free_size / total_size * 100, 2) || '%' free_rate
FROM ( SELECT tablespace_name, SUM (bytes) / 1024 / 1024 total_size
FROM dba_data_files
GROUP BY tablespace_name) a,
( SELECT tablespace_name, SUM (bytes) / 1024 / 1024 free_size
FROM dba_free_space
GROUP BY tablespace_name) b
WHERE a.tablespace_name = b.tablespace_name(+);
TABLESPACE_NAME total_size(MB) used_size(MB) free_size(MB) FREE_RATE
------------------------------ -------------- ------------- ------------- -----------------------------------------
SYSAUX 900 835.687 64.313 7.15%
UNDOTBS1
扩展undo表空间容量
最新推荐文章于 2024-09-20 07:26:57 发布
本文介绍了如何检查Oracle数据库的表空间使用情况,特别是Undo表空间,并详细讲解了如何计算扩展Undo表空间所需的大小,以及实际操作步骤,包括增加数据文件的SQL语句。
摘要由CSDN通过智能技术生成