oracle查看数据库文件大小

查看数据库文件大小,最直接的方式是打开对应的安装目录进行查看,也可以通过数据库的管理视图进行查看,如:
数据文件

select sum(bytes)/1024/1024/1024||'GB' from DBA_DATA_FILES;

日志文件

select sum(bytes)/1024/1024||'MB' from v$log;

临时文件

select sum(bytes)/1024/1024||'MB' from DBA_TEMP_FILES;

汇总统计数据文件、日志文件、临时文件

select sum(GB) as total 
from (select sum(bytes)/1024/1024/1024 as GB from DBA_DATA_FILES
union all
select sum(bytes)/1024/1024/1024 from DBA_TEMP_FILES
union all
select sum(bytes)/1024/1024/1024 from v$log
);

参考

https://blog.csdn.net/tus00000/article/details/82933966

    原文作者:okman312
    原文地址: https://blog.csdn.net/okman312/article/details/109445553
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞