建数据文件多出一个block大小

我 create tablespace test datafile 'E:\app\Administrator\oradata\jutin\TEST01.DBF' size 1M;
但是在机器上看到的是这个数据文件是1032KB 也就是说多出一个block的大小   有知道为什么的吗?
又测试 建一个50M大小的datafile,还是会多出一个bloc。

环境  windows。XP+11G
----------------------------------------------------------------------------
When a datafile on raw device is created, its size (e.i. the number you use in
the CREATE TABLESPACE statement) has to be less than the size of the raw device.

Let us assume this:

- size of the raw device is N bytes
- size of the database block is D bytes
- size of the Logical Volume Control Block (LVCB) is L bytes

Note: Provided the raw device is a standard UNIX partition, then consider L=0.
Otherwise (e.i. you use Logical Volume Manager and the raw device is a Logical
volume), the size of L will be platform. dependent.
For example:

        On AIX  : size of LVCB is 4k  ... choose L=4096
        On Tru64: size of LVCB is 64k ... choose L=65536

Check the OS vendor for details regarding the configuration.

To compute size of the datafile, distract both L (size of the LVCB, that may be
stored at the head of the Logical volume) and D (one database block, that is
used as an OS file header) from N (size of the raw device).

Then round the result down to the size of a database block.

Use this query to get the result:

SQL> select trunc((N-L-D)/D)*D  "SIZE" from dual;

Example:

I would like to create a raw datafile on a Logical volume /dev/vg00/rkamtest of
size 1000000 bytes, on AIX. Size of the database block is 8k.

SQL> select trunc((1000000-4096-8192)/8192)*8192 "SIZE" from dual&
#059;

      SIZE
----------
    983040

Then the size I will use is 983040:

SQL> CREATE TABLESPACE test DATAFILE '/dev/vg00/rkamtest' size 983040;

--------------------------------------------------
by sundog315
文件头,9i以下没有,10g开始就有了。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22372063/viewspace-704963/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/22372063/viewspace-704963/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值