`
readyman
  • 浏览: 14700 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
最近访客 更多访客>>
社区版块
存档分类
最新评论

oracle表空间扩展

阅读更多
看来仅需扩充表空间的即可解决。

第一步:查看表空间的名字和档案位置。在SQL栏输入或贴上下列内容。(不要做任何的修改)

select tablespace_name, file_id, file_name,
     round(bytes/(1024*1024),0) total_space
     from dba_data_files
     order by tablespace_name;



第二步:增大所需表空间的尺寸

alter database datafile '表空间储存位置'resize 新的尺寸,例如:

alter database datafile 'e:\oracle\oradata\esps_2008.dba'resize 4000m

BTW:

对於ORACLE数据库的表空间。除了手动增大所需表空见的尺寸的方法外:您也可使用其他方式来扩展表空见的尺寸。

第一种:增加数据档案。让表空间名对应更多的数据档案

alter tablespace 表空间名称
     add datafile '新数据档案的储存位置' size 新数据档案的尺寸,例如:

alter tablespace ESPS_2008
     add datafile 'e:\oracle\oradata\esps_2010.dba' size 1000m

第二种:设定数据档案自动扩展,以杜绝表空间不足的问题

alter database datafile '数据档案的储存位置'
     autoextend on next 下一次扩展数据档案的尺寸 maxsize 最大可接受的扩展尺寸的极限,例如:

alter database datafile 'e:\oracle\oradata\esps_2008.dba'
     autoextend on next 100m maxsize 10000m

第三步:查阅设定后的表空间资讯。在SQL栏输入或贴上下列内容。(不要做任何的修改)

select a.tablespace_name,a.bytes total,b.bytes used, c.bytes free,
     (b.bytes*100)/a.bytes "% used",(c.bytes*100)/a.bytes "% free"
     from sys.sm$ts_avail a,sys.sm$ts_used b,sys.sm$ts_free c
     where a.tablespace_name=b.tablespace_name and a.tablespace_name=c.tablespace_name

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics