我 create tablespace test datafile 'E:\app\Administrator\oradata\jutin\TEST01.DBF' size 1M;
但是在机器上看到的是这个数据文件是1032KB 也就是说多出一个block的大小 有知道为什么的吗?
又测试 建一个50M大小的datafile,还是会多出一个bloc。
环境 windows。XP+11G
但是在机器上看到的是这个数据文件是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;
--------------------------------------------------
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;
--------------------------------------------------
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22372063/viewspace-704963/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22372063/viewspace-704963/