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