如何扩展Oracle表空间
2013-06-24 21:40
183 查看
一次,我接到一個朋友的詢問。程式出現了錯誤的提示訊息。ora0163: 表 esps_2010.tbpaymentlimit 无法通过 210 (在表空间esps_2008)扩展。接下來,程式就出現了蠻多莫名的問題。很多流程都無法繼續。借助的工具是P/L SQL 即便在這裏面用SQL逕行作業。
看來僅需擴充表空間的即可解決。
第一步:查看表空間的名字和檔案位置。在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
看來僅需擴充表空間的即可解決。
第一步:查看表空間的名字和檔案位置。在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
相关文章推荐
- 如何查看oracle表空间是否自动扩展
- 如何修改oracle表空间自动扩展
- 如何扩展和查看Oracle表空间
- 用户增加,功能扩展时系统如何升级 架构改变
- php配置——扩展模块如何安装
- undo表空间暴长,如何取消自动扩展
- 如何完全屏蔽Chrome的提示:"请停用以开发者模式运行的扩展程序"
- 如何为龙芯2扩展gjx指令(存档)
- 如何创建一个AJAXControlToolKit的扩展控件
- window 如何找memcached 扩展以及如何把memcached 安装成服务
- 如何使用Sybase ASE数据库的扩展存储过程?
- 扩展系统Contacts menu后,通过点击这个Menu item如何获取被highlight contact的电话号码???????????
- 如何安装PHP扩展libzookeeper
- ObjectARX学习笔记(十七)--如何添加扩展记录xrecord
- 手把手教你如何扩展GridView之自动排序篇
- 如何写HtmlHelper的扩展方法。
- .NET基础扩展系列-如何获取事件的响应函数列表
- 工作总结30 ORACLE表空间无法扩展后处理
- Spring Boot 中如何使用 Dubbo Activate 扩展点
- 编程之美 扩展问题 之 如何处理二维空间的覆盖问题。