Chinaunix首页 | 论坛 | 博客
  • 博客访问: 224246
  • 博文数量: 119
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 1261
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-23 17:50
文章分类

全部博文(119)

文章存档

2016年(8)

2015年(78)

2014年(33)

我的朋友

分类: Oracle

2015-03-10 12:18:51

SQL> create tablespace test001 datafile '/u01/app/oracle/oradata/test001.dbf' size 1M autoextend on maxsize 10M;

Tablespace created.

SQL> alter database datafile '/u01/app/oracle/oradata/test001.dbf' resize 20M;   

Database altered.

SQL>

SQL> select AUTOEXTENSIBLE, MAXBYTES, BYTES, file_id from dba_data_files where file_name like '%test001%';

AUT   MAXBYTES      BYTES    FILE_ID
--- ---------- ---------- ----------
YES   10485760   20971520         13

SQL>
###attention here ,the command runs fine , but the valus of maxsize is not what we expected , it will be the same as 'BYTES'

SQL> ALTER DATABASE DATAFILE  '/u01/app/oracle/oradata/test001.dbf' autoextend on  maxsize 15M; 
Database altered.

SQL> select AUTOEXTENSIBLE, MAXBYTES, BYTES, file_id from dba_data_files where file_name like '%test001%';

AUT   MAXBYTES      BYTES    FILE_ID
--- ---------- ---------- ----------
YES   20971520   20971520         13

SQL>


MAXSIZE is a limit that you can override manually.
the MAXSIZE limits the automatic extension of the datafile but, Oracle let you
the possibility to override this by resizing manually your datafile.

阅读(2128) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~