oracle11.2.0.4
一直没关心自增长的默认大小,抽空测试了一下:
SQL> alter tablespace users add datafile '/app/oracle/oradata/ydgc/users03.dbf' size 5120M autoextend on;--使用autoextend on不加next,默认自增1个数据块,即8K字节,一般不够用。
Tablespace altered.
SQL> select file_name,bytes/1024/1024,increment_by from dba_data_files;
FILE_NAME BYTES/1024/1024 INCREMENT_BY
-------------------------------------------------- --------------- ------------
/app/oracle/oradata/ydgc/users01.dbf 5120 2560
/app/oracle/oradata/ydgc/undotbs01.dbf 5120 640
/app/oracle/oradata/ydgc/sysaux01.dbf 2048 1280
/app/oracle/oradata/ydgc/system01.dbf 2048 1280
/app/oracle/oradata/ydgc/users02.dbf 5120 2560
/app/oracle/oradata/ydgc/users03.dbf 5120 1
6 rows selected.
SQL> alter database datafile '/app/oracle/oradata/ydgc/users03.dbf' autoextend on next 20m;
Database altered.
SQL> select file_name,bytes/1024/1024,increment_by from dba_data_files;
FILE_NAME BYTES/1024/1024 INCREMENT_BY
-------------------------------------------------- --------------- ------------
/app/oracle/oradata/ydgc/users01.dbf 5120 2560
/app/oracle/oradata/ydgc/undotbs01.dbf 5120 640
/app/oracle/oradata/ydgc/sysaux01.dbf 2048 1280
/app/oracle/oradata/ydgc/system01.dbf 2048 1280
/app/oracle/oradata/ydgc/users02.dbf 5120 2560
/app/oracle/oradata/ydgc/users03.dbf 5120 2560 --2560*8k=20M
6 rows selected.
SQL>
INCREMENT_BY | NUMBER | Number of tablespace blocks used as autoextension increment. Block size is contained in the BLOCK_SIZE column of the DBA_TABLESPACES view. |