标签归档:arm oracle 小字节序

ARM上的oracle数据库存储字节序分析—小字节序

对在ARM CPU上运行的oracle数据库进行分析,判断大小字节序问题
从系统上lscpu看是小字节序

[root@xifenfei ~]# lscpu
Architecture:                    aarch64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
CPU(s):                          8
On-line CPU(s) list:             0-7
Thread(s) per core:              1
Core(s) per socket:              8
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       ARM
Model:                           1
Model name:                      Cortex-A76
Stepping:                        r4p1
BogoMIPS:                        125.00
NUMA node0 CPU(s):               0-7
…………
[root@xifenfei ~]# 

从dbid分析字节序问题
数据库中查看dbid值

SQL> select name,dbid,PLATFORM_ID,PLATFORM_NAME from v$database;

NAME            DBID PLATFORM_ID
--------- ---------- -----------
PLATFORM_NAME
--------------------------------------------------------------------------------
ARMDB     1195886419          23
Linux OS (AARCH64)

bbed查看dbid值

BBED> p kcvfh.kcvfhhdr.kccfhdbi
ub4 kccfhdbi                                @28       0x4747c753

BBED> set count 16
        COUNT           16

BBED> d
 File: /tmp/system01.dbf (0)
 Block: 1                Offsets:   28 to   43           Dba:0x00000000
------------------------------------------------------------------------
 53c74747 41524d44 42000000 03040000 

 <32 bytes per line>

从这里可以看出来dbid(1195886419)是倒序存储的,也就证明了arm linux上面运行的oracle 是小字节序的.

发表在 Linux, Oracle | 标签为 , | 评论关闭