求学资讯 oracle认证 提问
oracle认证 > 性能调优

Oracle认证性能调优考点:Oracle数据库表空间容量调整

来源:用户上传 上传用户:zfy 发布时间:2017-08-03

导读:
求学资讯网更新了“Oracle认证性能调优考点:Oracle数据库表空间容量调整”,供各位考生参考,更多考试资讯请继续关注求学资讯网。

  --1、获取需要释放空间的表空间信息(包含oracle database自有表空间)

  --drop table system.tbs_detail;

  create table system.tbs_detail as select

  a.tablespace_name,

  a.bytes/1024/1024 "Sum_MB",

  (a.bytes-b.bytes)/1024/1024 "used_MB",

  b.bytes/1024/1024 "free_MB",

  round(((a.bytes-b.bytes)/a.bytes)*100,2) "percent_used"

  from

  (select tablespace_name,sum(bytes) bytes from dba_data_files group by tablespace_name) a,

  (select tablespace_name,sum(bytes) bytes,max(bytes) largest from dba_free_space group by tablespace_name) b

  where a.tablespace_name=b.tablespace_name

  order by ((a.bytes-b.bytes)/a.bytes) desc;

  --select * from system.tbs_detail order by "Sum_MB" desc,"free_MB" desc;

  --2、获取需要释放空间的应用表空间数据文件使用情况

  --drop table system.datafile_space;

  create table system.datafile_space as

  select a.TABLESPACE_NAME,

  a.FILE_NAME,

  a.BYTES / 1024 / 1024 total,

  b.sum_free / 1024 / 1024 free

  from dba_data_files a,


声明:本站为免费网络服务提供商,网站所有信息均为用户自行发布并由用户承担相应法律责任,本站不对其真实性及合法性负责,如涉及侵权或者信息违法,请你及时与本站联系删除。

阅读 1318 举报

相关推荐
评论0

当前没有评论内容

发表评论 0条评论
95
微博
QQ
QQ空间
微信
取消