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> 

至此,验证结束。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值