首页 > 数据库 > Oracle > 正文

Oracle Log 的格式资料整理

2024-08-29 13:31:54
字体:
来源:转载
供稿:网友

1, 第一个块(offset=0x0)

0x00 - 0x03: 未知

0x04 - 0x07: 日志文件的块大小

0x08 - 0x0b: 日志文件的块数

0x0c - 0x0e: 平台标识串

2, 第二个块(offset = block_size)

0x00 - 0x03: 日志序列号

0x04 - 0x07: 日志文件块号

0x08 - 0x0b: 未知

0x0b - 0x0f: 未知

0x10 - 0x13: dbms软件版本号

0x14 - 0x17: 日志文件版本号

0x18 - 0x1b: dbid

0x1c - 0x23: db name

0x24 - 0x27: control sequence

0x28 - 0x2b: 日志文件的块数

0x2c - 0x2f: 日志文件的块大小

0x30 - 0x31: 日志组序号

0x32 - 0x33: 文件类型

0x5c - 0x9a: 日志文件说明

0x9b - 0x9b: 未知

0x9c - 0x9e: 下一个可用块(next avaiable block)

0xa0 - 0xa3: reset logs count

0xa4 - 0xa7: reset scn base

0xa8 - 0xa9: reset scn wrap

0xa4 - 0xb9: low scn number

0xba - 0xbf: low scn time

0xc0 - 0xc5: next scn number

0xc6 - 0xcb: next scn time

3, 第3-n个block

0x00 - 0x03: 日志序列号

0x04 - 0x07: 日志文件块号

0x08 - 0x0b: log时间

0x0c - 0x0d: 第一条记录的偏移, 0表示没有记录

0x0e - 0x0f: 未知(应当是chkval之类的)

<<日志记录>>

{

0x00 - 0x03: 日志记录长度, 加上第一条记录的偏移为第二条记录的偏移

0x04 - 0x04: valid标志

0x05 - 0x05: subscn (oracle 9i, 8i保留)

0x06 - 0x07: scn wrap

0x08 - 0x0b: scn base

<>

{

0x0c - 0x0c: operation layer

0x0d - 0x0d: operation code

0x0e - 0x0f: change # cls

0x10 - 0x11: change # afn

0x12 - 0x13: change # type

0x14 - 0x17: change # dba

0x18 - 0x1d: change # scn

0x1e - ....: redo data

}

}

4, operation layer & operation code

layer = 5 (transaction undo)

op code = 3 (rollout a transaction begin)

= 4 (commit transaction/transaction table update - no undo record)

= 7 (begin transaction/transaction table update)

= 8 (mark transaction as dead)

layer = 11 (row access)

op code = 1 interpret undo record

= 2 insert row piece

= 3 drop row piece

= 4 lock row piece

= 5 update row piece

= 6 overwrite row piece

= 7 manipulate first column

= 8 change forward address

= 9 change cluster key index

= 10 set key links

= 11 quick multi-insert (insert ... select ...)

= 12 quick multi-delete

= 13 toggle block header flags

  • 本文来源于网页设计爱好者web开发社区http://www.html.org.cn收集整理,欢迎访问。
  • 发表评论 共有条评论
    用户名: 密码:
    验证码: 匿名发表