ITPub博客

data block的转储

原创 Linux操作系统 作者:oracle_ace 时间:2007-12-17 14:58:53 0 删除 编辑

一般来讲,可以通过转储存数据块来对块的内容做进一步的研究:

步骤是这样的

C:\>sqlplus /nolog

SQL*Plus: Release 9.2.0.8.0 - Production on 星期一 12月 17 14:54:17 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> conn / as sysdba;
已连接。
SQL> select rowid,name,class_no from student;

ROWID                NAME                         CLASS_NO
------------------      --------------------                ----------
AAAB/RAABAAAGmSAAA    aaa                           3
AAAB/RAABAAAGmSAAB   bbb                            5
AAAB/RAABAAAGmSAAC   ccc                            1
AAAB/RAABAAAGmSAAD   ddd                           2
AAAB/RAABAAAGmSAAE   eee                           5
AAAB/RAABAAAGmSAAF    fff                              3
AAAB/RAABAAAGmSAAG   ggg                           2
AAAB/RAABAAAGmSAAI     iii                              1
AAAB/RAABAAAGmSAAK   jjj                              6
AAAB/RAABAAAGmSAAL   ALAN                        6

已选择10行。

SQL> select file_id,block_id,blocks from dba_extents where segment_name='STUDENT';

 FILE_ID   BLOCK_ID     BLOCKS
----------      ----------           ----------
         1          27025                 8

SQL> alter system dump datafile 1 block min 27025 block max 27026;

系统已更改。

下面是从udump中转储出来的内容:

Dump file d:\oracle\admin\icmnlsdb\udump\mylife_ora_3244.trc
Mon Dec 17 14:55:24 2007
ORACLE V9.2.0.8.0 - Production vsnsta=0
vsnsql=12 vsnxtr=3
Windows 2000 Version 5.1 Service Pack 2, CPU type 586
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
Windows 2000 Version 5.1 Service Pack 2, CPU type 586
Instance name: mylife

Redo thread mounted by this instance: 1

Oracle process number: 11

Windows thread id: 3244, image: ORACLE.EXE


*** 2007-12-17 14:55:24.343
*** SESSION ID:(10.517) 2007-12-17 14:55:24.312
Start dump data blocks tsn: 0 file#: 1 minblk 27025 maxblk 27026
buffer tsn: 0 rdba: 0x00406991 (1/27025)
scn: 0x0000.002b13f1 seq: 0x01 flg: 0x04 tail: 0x13f11001
frmt: 0x02 chkval: 0x301d type: 0x10=DATA SEGMENT HEADER - UNLIMITED
  Extent Control Header
  -----------------------------------------------------------------
  Extent Header:: spare1: 0      spare2: 0      #extents: 1      #blocks: 7    
                  last map  0x00000000  #maps: 0      offset: 4128 
      Highwater::  0x00406993  ext#: 0      blk#: 1      ext size: 7    
  #blocks in seg. hdr's freelists: 1    
  #blocks below: 1    
  mapblk  0x00000000  offset: 0    
                   Unlocked
     Map Header:: next  0x00000000  #extents: 1    obj#: 8145   flag: 0x40000000
  Extent Map
  -----------------------------------------------------------------
   0x00406992  length: 7    
 
  nfl = 1, nfb = 1 typ = 1 nxf = 0 ccnt = 1
  SEG LST:: flg: USED   lhd: 0x00406992 ltl: 0x00406992
buffer tsn: 0 rdba: 0x00406992 (1/27026)
scn: 0x0000.002f5592 seq: 0x01 flg: 0x04 tail: 0x55920601
frmt: 0x02 chkval: 0xdaa9 type: 0x06=trans data
Block header dump:  0x00406992
 Object id on Block? Y
 seg/obj: 0x1fd1  csc: 0x00.2dbbbd  itc: 2  flg: O  typ: 1 - DATA
     fsl: 0  fnx: 0x0 ver: 0x01
 
 Itl           Xid                  Uba         Flag  Lck        Scn/Fsc
0x01   0x0001.01c.000000b2  0x0080000e.006b.01  C---    0  scn 0x0000.002c7938
0x02   0x0007.026.000000b0  0x00800070.0043.01  C---    0  scn 0x0000.002ba459
 
data_block_dump,data header at 0x48e305c
===============
tsiz: 0x1fa0
hsiz: 0x2c
pbl: 0x048e305c
bdba: 0x00406992
     76543210
flag=--------
ntab=1
nrow=13
frre=7
fsbo=0x2c
fseo=0x1b8c
avsp=0x1ee7
tosp=0x1ee7
0xe:pti[0] nrow=13 offs=0
0x12:pri[0] offs=0x1f92
0x14:pri[1] offs=0x1f84
0x16:pri[2] offs=0x1f76
0x18:pri[3] offs=0x1f68
0x1a:pri[4] offs=0x1f5a
0x1c:pri[5] offs=0x1f4c
0x1e:pri[6] offs=0x1f30
0x20:pri[7] sfll=9
0x22:pri[8] offs=0x1f14
0x24:pri[9] sfll=12
0x26:pri[10] offs=0x1bf8
0x28:pri[11] offs=0x1b8c
0x2a:pri[12] sfll=-1
block_row_dump:
tab 0, row 0, @0x1f92
tl: 14 fb: --H-FL-- lb: 0x0  cc: 3
col  0: [ 3]  c2 0b 02
col  1: [ 3]  61 61 61
col  2: [ 2]  c1 04
tab 0, row 1, @0x1f84
tl: 14 fb: --H-FL-- lb: 0x0  cc: 3
col  0: [ 3]  c2 0b 03
col  1: [ 3]  62 62 62
col  2: [ 2]  c1 06
tab 0, row 2, @0x1f76
tl: 14 fb: --H-FL-- lb: 0x0  cc: 3
col  0: [ 3]  c2 0b 04
col  1: [ 3]  63 63 63
col  2: [ 2]  c1 02
tab 0, row 3, @0x1f68
tl: 14 fb: --H-FL-- lb: 0x0  cc: 3
col  0: [ 3]  c2 0b 05
col  1: [ 3]  64 64 64
col  2: [ 2]  c1 03
tab 0, row 4, @0x1f5a
tl: 14 fb: --H-FL-- lb: 0x0  cc: 3
col  0: [ 3]  c2 0b 06
col  1: [ 3]  65 65 65
col  2: [ 2]  c1 06
tab 0, row 5, @0x1f4c
tl: 14 fb: --H-FL-- lb: 0x0  cc: 3
col  0: [ 3]  c2 0b 07
col  1: [ 3]  66 66 66
col  2: [ 2]  c1 04
tab 0, row 6, @0x1f30
tl: 14 fb: --H-FL-- lb: 0x0  cc: 3
col  0: [ 3]  c2 0b 08
col  1: [ 3]  67 67 67
col  2: [ 2]  c1 03
tab 0, row 8, @0x1f14
tl: 14 fb: --H-FL-- lb: 0x0  cc: 3
col  0: [ 3]  c2 0b 0a
col  1: [ 3]  69 69 69
col  2: [ 2]  c1 02
tab 0, row 10, @0x1bf8
tl: 14 fb: --H-FL-- lb: 0x0  cc: 3
col  0: [ 3]  c2 0b 0d
col  1: [ 3]  6a 6a 6a
col  2: [ 2]  c1 07
tab 0, row 11, @0x1b8c
tl: 15 fb: --H-FL-- lb: 0x0  cc: 3
col  0: [ 3]  c2 0b 0c
col  1: [ 4]  41 4c 41 4e
col  2: [ 2]  c1 07
end_of_block_dump
End dump data blocks tsn: 0 file#: 1 minblk 27025 maxblk 27026

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

请登录后发表评论 登录
全部评论

注册时间:2007-12-10

  • 博文量
    284
  • 访问量
    783283