Quantcast
Channel: IT社区推荐资讯 - ITIndex.net
Viewing all articles
Browse latest Browse all 15843

查看表空间使用情况

$
0
0
 select   username,default_tablespace   from   dba_users;
 select t.tablespace_name,
       round(t.bytes / 1024 / 1024 / 1024, 2) || 'G' "总大小",
       round((t.bytes - f.bytes) / 1024 / 1024 / 1024, 2) || 'G' "已使用",
       round(100 * (t.bytes - f.bytes) / t.bytes, 2) || '%' "使用率"
  from (select tablespace_name, sum(bytes) bytes
          from dba_data_files
         group by tablespace_name) t,
       (select tablespace_name, sum(bytes) bytes
          from dba_free_space
         group by tablespace_name) f
 where f.tablespace_name(+) = t.tablespace_name

 



已有 0人发表留言,猛击->> 这里<<-参与讨论


ITeye推荐




Viewing all articles
Browse latest Browse all 15843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>