如何查询表空间的大小

上一篇 / 下一篇  2008-06-15 19:53:56 / 个人分类:Oracle

  • 文件版本: V1.0
  • 开发商: 本站原创
  • 文件来源: 本地
  • 界面语言: 简体中文
  • 授权方式: 免费
  • 运行平台: Win9X/Win2000/WinXP
51Testing软件测试网!y |wF?zs N

当前表空间大小
;n)?A~y+]"C0select sum(bytes) from dba_data_files where tablespace_name=$TABLESPACE
)t%O.b!y5D+B0已使用的表空间大小51Testing软件测试网IZI4R7d6N W.B
select sum(bytes) from dba_segments where tablespace_name=$TABLESPACE_NAME;51Testing软件测试网W!co.A.v~M`
未使用空间大小51Testing软件测试网!_;r }lm|y,y'R
select sum(bytes) from dba_free_space where tablespace_name=$TABLESPACE_NAME;51Testing软件测试网 R"r5pdg:z

D }`;a3~j0连接两视图,查看表空间大小:
gb] L4Q T.C&qC$@0
}6J![3M U G_+]1y0SQL> select a.tablespace_name,b.file_name,a.block_size,a.block_size,b.bytes/102451Testing软件测试网!eU/i2P!N1w
/1024 mb51Testing软件测试网$po ]/t a4Jc?4iS9_
2 from dba_tablespaces a,dba_data_files b51Testing软件测试网9p k#M6w;K0GR O
3 where a.tablespace_name=b.tablespace_name;
EUWD&a1zC`8c3y0

#f w%~%M5q:k%B@0

TAG: oracle Oracle

 

评分:0

我来说两句

Open Toolbar