Oracle表空间-大小设置

前端之家收集整理的这篇文章主要介绍了Oracle表空间-大小设置前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
1、到达最大值后自动扩展

sql> alter database datafile 'C:\orcl1122\disk5\lianxi_index.dbf' autoextend on
2 next 2M;
Database altered

sql>
sql> select FILE_NAME,AUTOEXTENSIBLE from dba_data_files where file_id=9;
FILE_NAME AUTOEXTENSIBLE
-------------------------------------------------------------------------------- --------------
C:\ORCL1122\DISK5\LIANXI_INDEX.DBF YES


2、手工重做数据文件的大小
sql> alter database datafile 'C:\orcl1122\disk5\lianxi_index.dbf ' resize 25M;
Database altered

sql> select FILE_NAME,BYTES/(1024*1024) MB from dba_data_files where file_id='9';
FILE_NAME MB
-------------------------------------------------------------------------------- ----------
C:\ORCL1122\DISK5\LIANXI_INDEX.DBF 25

sql>
3、添加数据文件增加表空间
sql> alter tablespace lianxi_index add datafile 'C:\ORCL1122\DISK5\LIANXI_INDEX02.DBF' size 15M; Tablespace altered sql> select FILE_NAME,BYTES/(1024*1024) MB from dba_data_files where file_id>'9'; FILE_NAME MB -------------------------------------------------------------------------------- ---------- C:\ORCL1122\DISK5\LIANXI_INDEX02.DBF 15

猜你在找的Oracle相关文章