表空间自增长的查看和建议autoextend on next 20m

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_BYNUMBER Number of tablespace blocks used as autoextension increment. Block size is contained in the BLOCK_SIZE column of the DBA_TABLESPACES view.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值