统计Oracle数据库文件的大小

1. 统计数据文件、暂时文件、日志文件大小

select sum(bytes)/1024/1024/1024 as GB from dba_data_files;

select sum(bytes)/1024/1024/1024 as GB from dba_temp_files;

select sum(bytes)/1024/1024/1024 as GB from v$log; 


2. 统计Oracle数据库文件占用空间

Total Size of the database= A+B+C
select sum(gb) total_gb
  from (select sum(bytes) / 1024 / 1024 / 1024 as gb
          from dba_data_files
        union all
        select sum(bytes) / 1024 / 1024 / 1024 as gb
          from dba_temp_files
        union all
        select sum(bytes) / 1024 / 1024 / 1024 as gb
          from v$log)

本文地址:http://blog.csdn.net/sunansheng/article/details/46325139

posted @ 2016-02-21 20:30  blfshiye  阅读(539)  评论(0)    收藏  举报