创建TABLESPACE 的ORA-03214错误
Kevin Zou
2011-8-25
在PUB论坛上看到一个问题,简单描述就是在创建TABLESPACE,遇到了ORA-03214的错误
SQL> create tablespace test datafile '/diskfdcprodb06/oradata1/oracle/timsdb/idx01/dbf/test01.dbf' size 1M autoextend on next 2m
2 maxsize 11M uniform;
create tablespace test datafile '/diskfdcprodb06/oradata1/oracle/timsdb/idx01/dbf/test01.dbf' size 1M autoextend on next 2m
*
ERROR at line 1:
ORA-03214: File Size specified is smaller than minimum required
查看METALINK 有这样的一段话:[ID 153869.1]
|
在这个CREATE TABLE已经中要求UNIFORM. 来管理extent,ORACLE对于缺省的EXTENT 的大小为:
UNIFORM. specifies that the tablespace is managed with uniform. extents of SIZE bytes.The default SIZE is 1 megabyte. All extents of temporary tablespaces are of uniform. size, so this keyword is optional for a temporary tablespace. However, you must specify UNIFORM. in order to specify SIZE. You cannot specify UNIFORM. for an undo tablespace.
所以以上的例子,MIN SIZE=3*8K+1024K=1048K
再次执行修改过的语句:
SQL> create tablespace test datafile '/diskfdcprodb06/oradata1/oracle/timsdb/idx01/dbf/test01.dbf' size 1048K autoextend on next 2m
2 maxsize 11M uniform;
Tablespace created.
创建成功。
在新创建的TABLESPACE 创建一个对象
SQL> create table tt tablespace test as select * from all_objects ;
Table created.
检查对象存储在TABLESPACE中的位置:
SQL> select file_id, block_id from dba_extents where segent_name ='TT' AND wner='SYS';
select file_id, block_id from dba_extents where segment_name ='TT' AND wner='SYS';
FILE_ID BLOCK_ID
---------- ----------
63 4
63 132
看到一个新的TABLESPACE中的第一个对象存储位置从第4个block 开始。
DUMP 文件的BLOCK来验证:
|
从DUMP从来的block看到,确实前3个block为metadata 信息,存放tablespace,datafile的信息,真正的数据存放在从第四个block开始的空间。
如要看HEADER 的信息,可以通过
alter session set events 'immediate trace name FILE_HDRS level 10';
来查看下。
列出部分FILE HEADER的信息:
|
-THE END-