Oracle datafile在linux文件系統上的頭大小

Oracle在linux文件系統上,用一個表空間block size大小字節的空間,作爲OS文件的頭。

驗證如下:

07:01:27 SYS@ora11g> create tablespace test datafile '/u01/app/oracle/oradata/ora11g/test.dbf' size 10m blocksize 32k;
create tablespace test datafile '/u01/app/oracle/oradata/ora11g/test.dbf' size 10m blocksize 32k
*
ERROR at line 1:
ORA-29339: tablespace block size 32768 does not match configured block sizes


07:02:31 SYS@ora11g> !oerr ora 29339
29339, 00000, "tablespace block size %s does not match configured block sizes"
// *Cause:  The block size of the tablespace to be plugged in or
//          created does not match the block sizes configured in the 
//          database.
// *Action:Configure the appropriate cache for the block size of this 
//         tablespace using one of the various (db_2k_cache_size, 
//         db_4k_cache_size, db_8k_cache_size, db_16k_cache_size, 
//         db_32K_cache_size) parameters.

07:02:59 SYS@ora11g> alter system set db_32K_cache_size = 10m;

System altered.

07:03:27 SYS@ora11g> create tablespace test datafile '/u01/app/oracle/oradata/ora11g/test.dbf' size 10m blocksize 32k;

Tablespace created.

07:03:33 SYS@ora11g> !ls -ltr /u01/app/oracle/oradata/ora11g/test.dbf
-rw-r-----. 1 oracle oinstall 10518528 Mar  3 07:03 /u01/app/oracle/oradata/ora11g/test.dbf

07:03:41 SYS@ora11g> !ls -ltr /u01/app/oracle/oradata/ora11g/brucetbs.dbf
-rw-r-----. 1 oracle oinstall 10493952 Mar  3 04:05 /u01/app/oracle/oradata/ora11g/brucetbs.dbf

07:03:59 SYS@ora11g> select file#,bytes from v$datafile;

     FILE#      BYTES
---------- ----------
         1  807403520
         2  618659840
         3   94371840
         4    5242880
         5  348651520
         6   10485760
         7   10485760

7 rows selected.

07:05:15 SYS@ora11g> select 10518528 - 10485760 from dual;

10518528-10485760
-----------------
            32768   <<< block size 32K

07:05:48 SYS@ora11g> select 10493952 - 10485760 from dual;

10493952-10485760
-----------------
             8192   <<< block size 8K

07:06:07 SYS@ora11g> 

至此,驗證結束。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章