ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Data Block Structure ----Row Data

Data Block Structure ----Row Data

原创 Linux操作系统 作者:ylw66 时间:2009-08-20 19:55:19 0 删除 编辑

SQL> conn scott/tiger

已连接。

SQL> select * from dept;

     DEPTNO DNAME          LOC

---------- -------------- -------------

        10 ACCOUNTING     NEW YORK

        20 RESEARCH       DALLAS

        30 SALES          CHICAGO

        40 OPERATIONS     boston

        50 test2          ddd

SQL> @table_blocks;

输入 table 的值:  dept

原值    4:  from &table) group by f,b

新值    4:  from dept) group by f,b

         F          B   COUNT(*)

---------- ---------- ----------

         1      50450          5

SQL> alter system dump datafile 1 block 50450;

系统已更改。

SQL> @trace_file_name;

TRACE_FILE_NAME

-----------------------------------------------

d:\oracle\admin\game\udump/game_ora_6128.trc

 

查看dump文件,row data 部分:

block_row_dump:

tab 0, row 0, @0x1f86

tl: 26 fb: --H-FL-- lb: 0x0  cc: 3

col  0: [ 2]  c1 0b

col  1: [10]  41 43 43 4f 55 4e 54 49 4e 47

col  2: [ 8]  4e 45 57 20 59 4f 52 4b

tab 0, row 1, @0x1f70

tl: 22 fb: --H-FL-- lb: 0x0  cc: 3

col  0: [ 2]  c1 15

col  1: [ 8]  52 45 53 45 41 52 43 48

col  2: [ 6]  44 41 4c 4c 41 53

tab 0, row 2, @0x1f5c

tl: 20 fb: --H-FL-- lb: 0x0  cc: 3

col  0: [ 2]  c1 1f

col  1: [ 5]  53 41 4c 45 53

col  2: [ 7]  43 48 49 43 41 47 4f

tab 0, row 3, @0x1f15

tl: 24 fb: --H-FL-- lb: 0x0  cc: 3

col  0: [ 2]  c1 29

col  1: [10]  4f 50 45 52 41 54 49 4f 4e 53

col  2: [ 6]  62 6f 73 74 6f 6e

tab 0, row 4, @0x1eb2

tl: 16 fb: --H-FL-- lb: 0x0  cc: 3

col  0: [ 2]  c1 33

col  1: [ 5]  74 65 73 74 32

col  2: [ 3]  64 64 64

end_of_block_dump

 

有5行数据,以第1行为例

SQL> col deptno for a10

SQL> col dname for a30

SQL> col loc for a30

SQL> select dump(deptno,16) deptno,dump(dname,16) dname,dump(loc,16) loc from de

pt where deptno=10;

DEPTNO     DNAME                          LOC

---------- ------------------------------ ------------------------------

Typ=2 Len= Typ=1 Len=10: 41,43,43,4f,55,4 Typ=1 Len=8: 4e,45,57,20,59,4f

2: c1,b    e,54,49,4e,47                  ,52,4b

 

col  0: [ 2]  c1 0b  -----deptno:10

col  1: [10]  41 43 43 4f 55 4e 54 49 4e 47-----dname:ACCOUNTING

col  2: [ 8]  4e 45 57 20 59 4f 52 4b------loc:NEW YORK

 

关于number类型的deptno=10如何解析为c1 0b,论坛版主有帖子说明,很不错

 

dump的用法:DUMP(expr[,number_format[,start_position][,length]]) 

dump(col_name,8|10|16|17),分別指八进制|十进制|十六进制|单字符

typ表示数据类型

Typ

data type

1

varchar2

2

number

8

long

12

date

23

raw

24

long raw

69

rowid

96

char

112

clob

113

blob

114

bfile

180

timestamp

181

timestamp with timezone

182

interval year to month

183

interval day to second

208

urowid

231

timestamp with local timezone

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22111412/viewspace-612781/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: LogMiner
请登录后发表评论 登录
全部评论

注册时间:2009-07-29

  • 博文量
    57
  • 访问量
    107665