[20140428]建立表空间的bug?.txt
http://teymur-hajiyev.blogspot.com/2014/04/never-hurry-up-for-telling-it-is-bug-in.html
SYS@test> @ver
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
SYS@test> show parameter db_create_file_dest
NAME TYPE VALUE
------------------------------------ ---------------------------------------- ------
db_create_file_dest string
SYS@test> alter system set db_create_file_dest='/u01/app/oracle11g/oradata/test' scope=memory;
System altered.
SYS@test> CREATE TABLESPACE TEST_DG_2 DATAFILE SIZE 10M , ,;
Tablespace created.
SYS@test> column file_name format a76
SYS@test> select * from dba_data_files where tablespace_name='TEST_DG_2';
FILE_NAME FILE_ID TABLESPACE_NAME BYTES BLOCKS STATUS RELATIVE_FNO AUT MAXBYTES MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS ONLINE_
---------------------------------------------------------------------------- ------- ---------------- ---------- ---------- --------- ------------ --- ---------- ---------- ------------ ---------- ----------- -------
/u01/app/oracle11g/oradata/test/TEST/datafile/o1_mf_test_dg__9ow1m72h_.dbf 11 TEST_DG_2 10485760 1280 AVAILABLE 11 NO 0 0 0 9437184 1152 ONLINE
/u01/app/oracle11g/oradata/test/TEST/datafile/o1_mf_test_dg__9ow1m74k_.dbf 12 TEST_DG_2 104857600 12800 AVAILABLE 12 YES 3.4360E+10 4194302 12800 103809024 12672 ONLINE
/u01/app/oracle11g/oradata/test/TEST/datafile/o1_mf_test_dg__9ow1m7og_.dbf 13 TEST_DG_2 104857600 12800 AVAILABLE 13 YES 3.4360E+10 4194302 12800 103809024 12672 ONLINE
--可以发现建立了3个数据文件.
SYS@test> select DBMS_METADATA.GET_DDL('TABLESPACE','TEST_DG_2') from dual ;
DBMS_METADATA.GET_DDL('TABLESPACE','TEST_DG_2')
------------------------------------------------------------------------------
CREATE TABLESPACE "TEST_DG_2" DATAFILE
SIZE 10485760,
SIZE 104857600
AUTOEXTEND ON NEXT 104857600 MAXSIZE 32767M,
SIZE 104857600
AUTOEXTEND ON NEXT 104857600 MAXSIZE 32767M
LOGGING ONLINE PERMANENT BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT
NOCOMPRESS SEGMENT SPACE MANAGEMENT AUTO
--看看里面的逗号就明白了.第1个大小10M,第2个大小100M(缺省大小),第3个大小100M.
SYS@test> CREATE TABLESPACE TEST_DG_2 DATAFILE SIZE 10M , size 10M, size 10M;
Tablespace created.
SYS@test> select * from dba_data_files where tablespace_name='TEST_DG_2';
FILE_NAME FILE_ID TABLESPACE_NAME BYTES BLOCKS STATUS RELATIVE_FNO AUT MAXBYTES MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS ONLINE_
---------------------------------------------------------------------------- ---------- --------------- ---------- ---------- --------- ------------ --- ---------- ---------- ------------ ---------- ----------- -------
/u01/app/oracle11g/oradata/test/TEST/datafile/o1_mf_test_dg__9ow1zodo_.dbf 11 TEST_DG_2 10485760 1280 AVAILABLE 11 NO 0 0 0 9437184 1152 ONLINE
/u01/app/oracle11g/oradata/test/TEST/datafile/o1_mf_test_dg__9ow1zogq_.dbf 12 TEST_DG_2 10485760 1280 AVAILABLE 12 NO 0 0 0 9437184 1152 ONLINE
/u01/app/oracle11g/oradata/test/TEST/datafile/o1_mf_test_dg__9ow1zop5_.dbf 13 TEST_DG_2 10485760 1280 AVAILABLE 13 NO 0 0 0 9437184 1152 ONLINE
SYS@test> select DBMS_METADATA.GET_DDL('TABLESPACE','TEST_DG_2') from dual ;
DBMS_METADATA.GET_DDL('TABLESPACE','TEST_DG_2')
-----------------------------------------------------------------------------
CREATE TABLESPACE "TEST_DG_2" DATAFILE
SIZE 10485760,
SIZE 10485760,
SIZE 10485760
LOGGING ONLINE PERMANENT BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT
NOCOMPRESS SEGMENT SPACE MANAGEMENT AUTO
--总之注意一些细节.