Oracle管理

查看oralce表空间的大小

时间:2013/9/7 23:10:58  作者:www.solgle.com  来源:说歌社区  查看:316  评论:0
内容摘要:oralce 每个表空间的数据空间大小2.查看各表空间分配情况。select tablespace_name, sum(bytes) / 1024 / 1024 from dba_data_files group by tablespace_name; 3.查看各表空间空闲情况。...
oralce 每个表空间的数据空间大小

2.查看各表空间分配情况。

select tablespace_name, sum(bytes) / 1024 / 1024 from dba_data_files

group by tablespace_name;

3.查看各表空间空闲情况。

select tablespace_name, sum(bytes) / 1024 / 1024 from dba_free_space group by tablespace_name;

4.更改数据表大小(10G)

alter database datafile '/ora/oradata/radius/undo.dbf' resize 10240m;

5.设置表空间不足时自动增长

5.1查看表空间是否自动增长

SELECT FILE_NAME,TABLESPACE_NAME,AUTOEXTENSIBLE FROM dba_data_files;

5.2 设置表空间自动增长

ALTER DATABASE DATAFILE 'c:\SmartDB01.ora' AUTOEXTEND ON;//打开自动增长

ALTER DATABASE DATAFILE 'c:\SmartDB01.ora' AUTOEXTEND ON NEXT 200M ;//每次自动增长200m

ALTER DATABASE DATAFILE 'c:\SmartDB01.ora' AUTOEXTEND ON NEXT 200M MAXSIZE 1024M;//每次自动增长200m,数据表最大不超过1G


------------------------------------------------

 

select BYTES from dba_segments
 where segment_name = table_name and segment_type = 'TABLE'
把segment_type改成'INDEX'就可以看到这张表上所有索引的大小了


 

标签:查看oralce表空间的大小 

solgle.com 版权所有,欢迎分享!!!

相关文章
    相关评论
     img1 img2 img3 img4 img5 img6 img7 img8 img9 img10
    评论者:      验证码:  点击获取验证码
       Copyright © 2013-2028 solgle.com,All rights reserved.[solgle.com] 公安机关备案号:51010802000219
    Email:solgle@solgle.com; weixin:cd1008610000 ICP:蜀ICP备14011070号-1