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,OracleDBA)