Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Does a datafile know *its* blocksize ?
Spendius wrote:
> Brian Peasland a écrit :
> > The tablespace's block size does not have any correlation to its extent
> > allocation algorithm or segment space management.
> I was talking about the fact that the blocksize is stored in the
> datafile or not.
I am never sure where Oracle stores stuff. A lot of the time, you can see convert the hex in the file to the ascii equivalent, epscially for strings. Below is what is *not* a null character in the first two blocks (8K block size of the users datafile in my small test 10.2.0.2 database on XP professional).
C:\SCRIPTS\java>java readBinaryFile
"C:\oracle\product\10.2.0\oradata\test10g\USE
RS01.DBF" 1 16384
BYTE 2 value is 162 in decimal. BYTE 7 value is 192 in decimal. BYTE 8 value is 255 in decimal.
BYTE 22 value is 32 in decimal. BYTE 25 value is 57 in decimal. BYTE 26 value is 28 in decimal. BYTE 29 value is 125 in decimal. BYTE 30 value is 124 in decimal.
BYTE 8197 value is 1 in decimal. BYTE 8200 value is 1 in decimal. BYTE 8207 value is 1 in decimal. BYTE 8208 value is 4 in decimal.
BYTE 8221 value is 171 in decimal. BYTE 8222 value is 157 in decimal. BYTE 8223 value is 190 in decimal. BYTE 8224 value is 50 in decimal. BYTE 8225 value is 84 in decimal. BYTE 8226 value is 69 in decimal. BYTE 8227 value is 83 in decimal. BYTE 8228 value is 84 in decimal. BYTE 8229 value is 49 in decimal.
BYTE 8237 value is 57 in decimal. BYTE 8238 value is 28 in decimal. BYTE 8242 value is 32 in decimal.
BYTE 8305 value is 110 in decimal. BYTE 8306 value is 167 in decimal. BYTE 8307 value is 192 in decimal.
BYTE 8532 value is 83 in decimal. --> BYTE 8533 value is 69 in decimal. --> BYTE 8534 value is 82 in decimal. --> BYTE 8535 value is 83 in decimal. -->
BYTE 8705 value is 2 in decimal. BYTE 8837 value is 7 in decimal. BYTE 8839 value is 7 in decimal. BYTE 8841 value is 7 in decimal. BYTE 8843 value is 1 in decimal. BYTE 8857 value is 2 in decimal. BYTE 8860 value is 1 in decimal.
Oracle stores integers in a proprietary format. It's not a straight hex conversion, use the dump(number,16) function for an example. The block size may be in there somewhere above, I don't know. Part of it is the extent bitmap as well.
What is interesting is that even after I issued a system checkpoint, none of the byte values above changed. As a result, I don't even know where the current checkpoint number is stored, LOL!
It's nice we don't *have* to know this stuff, but like you, I am always curious :)
Regards,
Steve Received on Tue Sep 05 2006 - 11:57:07 CDT