Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Just curious: Why are all my datafiles are too big - by 8192 bytes

3290974Sep 6 2016 — edited Sep 6 2016

Hi,

yesterday I was playing around and tried out a few things related to tablespaces and datafiles.

At some point I discovered that - on disk - all datafiles exceed the specified size by exactly 8KB.

I tried sizes from 2MB to 2GB, I tried it with new tablespaces and added extra files to already existing ones, the result is always the same the file is too big.

This is the output according to v$datafile

FILE# TS#    BYTES  BLOCKS CREATE_BYTES NAME

----- --- -------- ------- ------------ ------------------------------   

11  12  2097152     256      2097152 /data/oracle/...../dummy01.dbf   

12  12  2097152     256      2097152 /data/oracle/...../dummy02.dbf

And this is a look at the files from OS level

ora11> ls -l

-rw-r----- 1 ora11 oinstall     2105344  5. Sep 16:31 dummy01.dbf

-rw-r----- 1 ora11 oinstall     2105344  6. Sep 10:42 dummy02.dbf

If we compare it's 2.105.344 - 2.097.152 = 8.192 - so exactly 8KB too big.

Does anyone know where this comes from and what's inside? I couldn't find a single source that deals with that topic.

I always thought Oracle just uses the first 128 blocks of a datafile to store internal management data but obviously there's more.

Btw: This was a 64 bit Oracle 11.2.0.4 on SLES Linux. Don't have any other platforms to test here but I guess it's more a conceptual thing anyway.

Regards

Marcus

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2016
Added on Sep 6 2016
15 comments
627 views