Focus On Oracle

Installing, Backup & Recovery, Performance Tuning,
Troubleshooting, Upgrading, Patching

Oracle Engineered System


当前位置: 首页 » 技术文章 » AODU

aodu(At Oracle Database Utility)之rowid

Oracle8之前的rowid使用了8个byte,oracle8之后使用了10个byte,以下是rowid的格式

Oracle8之前的rowid格式
bits 1 to 32  (bytes 1 to 4 ): block number inside the file containing the row (0-4294967295)
bits 33 to 48 (bytes 5 and 6): row number inside the block containing the row (0-65535)
bits 49 to 64 (bytes 7 and 8): file number (0-65535)

When printed, each byte was displayed by 2 hexadecimal characters (0-9A-F) and each field separated by a dot: BBBBBBBB.RRRR.FFFF

Oracle8开始之后的rowid格式,采用base64
bits 1 to 32  (bytes 1 to 4): data object id (0-4294967295)
bits 33 to 44 (byte 5 and half byte 6): file number inside the tablespace (0-4095)
bits 45 to 64 (half byte 6 and bytes 7 and 8): block number inside the file (0-1048575)
bits 65 to 80 (bytes 9 and 10): row number inside the block (0-65535)


When printed, each field is displayed in radix 64 (A-Za-z0-9+/): OOOOOOFFFBBBBBBRRR

Note that for a bigfile tablespace File and Block fields are combined to give Block number in the big file.
bigfile tablespace的文件和块合并成块的编号,文件号是固定的1024.


AODU的rowid功能会把oracle8之后的格式转化为可读的格式,下面是样例

Note:oracle7的数据库很少有人用,所以没有做解析

AODU> rowid AAAAECAABAAAAgiAAA

         Rowid Info
        Data  Object: 258  0x102
        Rfile Number: 1  0x1
        Block Number: 2082  0x822
          Row Number: 0  0x0

AODU>



Reference

http://www.orafaq.com/wiki/ROWID

https://en.wikipedia.org/wiki/Base64

关键词:aodu 

相关文章

aodu(At Oracle Database Utility)之optim
aodu(At Oracle Database Utility)之asm(二)
aodu(At Oracle Database Utility)之asm(一)
aodu(At Oracle Database Utility)之rac(二)
aodu(At Oracle Database Utility)之rac(一)
aodu(At Oracle Database Utility)之ora600
aodu(At Oracle Database Utility)之asmdisk
aodu(At Oracle Database Utility)之unwrap
aodu(At Oracle Database Utility)之rdba
aodu(At Oracle Database Utility)之drux
aodu(At Oracle Database Utility)之time
aodu(At Oracle Database Utility)之odlog
Top