专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »数据库 » 创建表空间语句:显示表空间的使用情况的SQL语句 »正文

创建表空间语句:显示表空间的使用情况的SQL语句

来源: 发布时间:星期二, 2008年12月9日 浏览:407次 评论:0

  col tsname format a16 justify c heading 'Tablespace'
  col nfrags format 999,990 justify c heading 'FreeFrags'
  col mxfrag format 999,999,990 justify c heading 'LargestFrag (KB)'
  col totsiz format 999,999,990 justify c heading 'Total(KB)'
  col avasiz format 999,999,990 justify c heading 'Available(KB)'
  col pctusd format 990 justify c heading 'PctUsed'
  select
  total.tablespace_name tsname,
  count(free.bytes) nfrags,
  nvl(max(free.bytes)/1024,0) mxfrag,
  total.bytes/1024 totsiz,
  nvl(sum(free.bytes)/1024,0) avasiz,
  (1-nvl(sum(free.bytes),0)/total.bytes)*100 pctusd
  from
  dba_data_files total,
  dba_free_space free
  where
  total.tablespace_name = free.tablespace_name(+)
  group by
  total.tablespace_name,
  total.bytes;
0

相关文章

读者评论

发表评论

  • 昵称:
  • 内容: