查看: 15225|回复: 24

[精华] 如何使用db2dart来了解DB2磁盘存储格式

[复制链接]
招聘 : c/c++研发
论坛徽章:
45
技术图书徽章
日期:2014-03-10 14:09:192012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-01-04 11:51:22ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15现任管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:50
跳转到指定楼层
1#
发表于 2009-11-14 04:13 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这一次,俺不打算再用案例了,而是描述一下如何通过我们可以使用的db2dart工具来dump磁盘的裸数据,进行data recovery。

通过db2dart,每一个用户都可以比较容易地了解到数据页,索引页,EMP页的格式(当然,对于LOB页的格式没有很好的方法去了解)。这样的话,当某些情况下数据页被损坏无法查询,db2dart /DDEL也只能dump那些好的页,用户则可以通过手工的方法查找出损坏页里面的部分数据。

在这里,俺假设读者对DB2已经有了基本的了解,对tablespace/container的概念,结构有所了解,能够熟练使用db2dart工具,对操作系统的文件系统,磁盘结构有所了解。

首先,让我们来看一看db2dart的几个特别的用法。

相信很多人都用过/DB /TS /T /DDEL /LHWM等参数。但是这里我们强调的是另外几个,包括/DD /DP /DI  /DEMP。

篇幅所限,我们这里只讨论/DD。其余的同理……

/DD是Dump Data,也就是把一个数据页给dump出来。

Dump的时候有两种格式化的方法,一种是 /v y,也就是翻译成人们可以读懂的冬冬。另一种是 /v h,也就是直接把16进制数据给弄出来。通过细心地比较两者,用户可以大概猜出如何把16进制的裸数据与人们可以读懂的数据对应起来。

给大家一个例子:

  1. (taoewang@bugdbug) /home/taoewang $ db2 "describe table tab2"

  2. Column                         Type      Type
  3. name                           schema    name               Length   Scale Nulls
  4. ------------------------------ --------- ------------------ -------- ----- ------
  5. I                              SYSIBM    INTEGER                   4     0 Yes
  6. J                              SYSIBM    INTEGER                   4     0 Yes
  7. C                              SYSIBM    CHARACTER                50     0 Yes

  8.   3 record(s) selected.

  9. (taoewang@bugdbug) /home/taoewang $ db2 "select count(*) from tab2"

  10. 1
  11. -----------
  12.      100000

  13.   1 record(s) selected.

  14. (taoewang@bugdbug) /home/taoewang $ db2 "select TABLEID,TBSPACEID from syscat.tables where TABNAME='TAB2'"

  15. TABLEID TBSPACEID
  16. ------- ---------
  17.       5         2

  18.   1 record(s) selected.

  19. (taoewang@bugdbug) /home/taoewang/test $ db2 "select * from TAB2 fetch first 1 rows only"

  20. I           J           C
  21. ----------- ----------- --------------------------------------------------
  22.           1           1 this is 1

  23.   1 record(s) selected.
复制代码


我们有一个表,叫做tab2。其中有3个列,I,J,C,分别是int int char(50),都是可以被设置为NULL的。表里面存有100000行数据。表的tid是5,pid是2。
第一行的数据是 (1,1,"this is 1")

大家知道,表的头和一些控制信息是存储在page 0里面的,这样的话,我们可以用这个命令得到page 0的ascii的dump

  1. db2dart ex5 /DD /TSI 2 /OI 5 /v y /PS 0 /NP 1 /RPTF tsi2oi5vyps0np1.out
复制代码

然后用下面的命令得到raw dump

  1. db2dart ex5 /DD /TSI 2 /OI 5 /v h /PS 0 /NP 1 /RPTF tsi2oi5vhps0np1.out
复制代码


首先我们来看ascii dump,也就是/v y的输出:

  1. ______________________________________________________________________________



  2.         _______                    DART                   _______

  3.    D a t a b a s e   A n a l y s i s   a n d   R e p o r t i n g   T o o l

  4.                            IBM    DB2    6000





  5. ______________________________________________________________________________

  6. DART (V9.1)  Report:
  7. 2009-11-13-14.02.19.721355

  8.             Database Name: EX5
  9.             Report name: tsi2oi5vyps0np1.out
  10.             Database Subdirectory: /home/taoewang/ex5/taoewang/NODE0000/SQL00001
  11.             Operational Mode: Database Inspection Only (INSPECT)

  12. ______________________________________________________________________________
  13. ------------------------------------------------------------------------------


  14. Action option: DD
  15. Table-object-ID: 5; Tablespace-ID: 2; First-page: 0; Number-pages: 1; Verbose: y

  16. FYI: An active connection to the database has been detected.
  17.      False errors may be reported.  
  18.      Deactivate all connections and re-run to verify.

  19. Warning: The database state is not consistent.

  20. Warning: Reorg rows MAY be due to the inconsistent state of the database.
  21. Connecting to Buffer Pool Services...

  22.    Table object report phase start.
  23.    Dump format is verbose.

  24.                            ______________________________________

  25.          Page 0 of object 5 from table space 2.

  26.          BPS Page Header:

  27.                      Page Data Offset = 48
  28.                      Page Data Length = 4048
  29.                              Page LSN = 0000 0330 33A5
  30.                    Object Page Number = 0
  31.                      Pool Page Number = 256
  32.                             Object ID = 5
  33.                           Object Type = Data Object

  34.                Data Page Header:

  35.                            Slot Count = 44
  36.                      Total Free Space = 36
  37.                   Total Reserve Space = 0
  38.                Youngest Reserve Space = n/a
  39.                          Youngest TID = n/a
  40.                     Free Space Offset = 123
  41.                   Maximum Record Size = 69

  42.                Data Records:


  43.             Slot 0:

  44.                Offset Location = 3996  (xF9C)
  45.                Record Length = 32  (x20)

  46.                Record Type = Data Object Header Control Record

  47.                   Page count = 1787
  48.          Object Creation LSN = 0000 0106 AE3E
  49.                 Object State = x0000
  50.           UDI Since Runstats = 99958
  51.                   DFH flag bits = x00000000

  52.             Slot 1:

  53.                Offset Location = 2992  (xBB0)
  54.                Record Length = 1004  (x3EC)

  55.                Record Type = Free Space Control Record

  56.                Free space entries:
  57.                  0:    36 (x0024),    52 (x0034),    52 (x0034),    52 (x0034)
  58.                  4:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  59.                  8:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  60.                 12:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  61.                 16:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  62.                 20:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  63.                 24:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  64.                 28:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  65.                 32:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  66.                 36:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  67.                 40:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  68.                 44:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  69.                 48:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  70. ….
  71.                476:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  72.                480:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  73.                484:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  74.                488:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  75.                492:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
  76.                496:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)

  77.             Slot 2:

  78.                Offset Location = 2916  (xB64)
  79.                Record Length = 76  (x4C)

  80.                Record Type = Table Directory Record

  81.                   TDIR version = 2
  82.                   MetaIndex Root Page = 321
  83.                   Index Type = 2
  84.                   Max Insert Search = 0
  85.                   Dictionary RID -- Page 0  Slot 0
  86.                   Mapping Directory RID  --  Page 0  Slot 0
  87.                   Current table row format version = 0
  88.                   Flags = x0000000106000200
  89.                      bit representation = 00000000 00000000 00000000 00000001
  90.                                           00000110 00000000 00000010 00000000
  91.                   Check pending info:
  92.                      Constraint status    = x00
  93.                      Constraint RID page      = 0
  94.                      last BID page     = x00000000

  95.             Slot 3:

  96.                Offset Location = 2884  (xB44)
  97.                Record Length = 32  (x20)

  98.                Record Type = Table Description Record

  99.                   Number of Columns = 3


  100.                   Column 1:
  101.                   Type is Long Integer
  102.                   Length = 4
  103.                   Allows NULLs
  104.                   Prohibits Default
  105.             Fixed offset: 0

  106.                   Column 2:
  107.                   Type is Long Integer
  108.                   Length = 4
  109.                   Allows NULLs
  110.                   Prohibits Default
  111.             Fixed offset: 5

  112.                   Column 3:
  113.                   Type is Fixed Length Character String
  114.                   Length = 50
  115.                   Allows NULLs
  116.                   Prohibits Default
  117.             Fixed offset: 10

  118.             Slot 4:

  119.                Offset Location = 2815  (xAFF)
  120.                Record Length = 69  (x45)

  121.                Record Type = Table Data Record (FIXEDVAR)

  122.                Record Flags = 0

  123.                Fixed part length value = 61

  124.                   Column 1:
  125.             Fixed offset: 0
  126.                   Type is Long Integer
  127.                   Value = 1

  128.                   Column 2:
  129.             Fixed offset: 5
  130.                   Type is Long Integer
  131.                   Value = 1

  132.                   Column 3:
  133.             Fixed offset: 10
  134.                   Type is Fixed Length Character String
  135.                       74686973 20697320 31202020 20202020    this is 1      
  136.                 20202020 20202020 20202020 20202020                    
  137.                 20202020 20202020 20202020 20202020                    
  138.                 2020                                                   


  139.             Slot 5:

  140.                Offset Location = 2746  (xABA)
  141.                Record Length = 69  (x45)

  142.                Record Type = Table Data Record (FIXEDVAR)

  143.                Record Flags = 0

  144.                Fixed part length value = 61

  145.                   Column 1:
  146.             Fixed offset: 0
  147.                   Type is Long Integer
  148.                   Value = 2

  149.                   Column 2:
  150.             Fixed offset: 5
  151.                   Type is Long Integer
  152.                   Value = 2

  153.                   Column 3:
  154.             Fixed offset: 10
  155.                   Type is Fixed Length Character String
  156.                       74686973 20697320 32202020 20202020    this is 2      
  157.                 20202020 20202020 20202020 20202020                    
  158.                 20202020 20202020 20202020 20202020                    
  159.                 2020                                                   


  160.             Slot 6:

  161.                Offset Location = 2677  (xA75)
  162.                Record Length = 69  (x45)

  163.                Record Type = Table Data Record (FIXEDVAR)

  164.                Record Flags = 0

  165.                Fixed part length value = 61

  166.                   Column 1:
  167.             Fixed offset: 0
  168.                   Type is Long Integer
  169.                   Value = 3

  170.                   Column 2:
  171.             Fixed offset: 5
  172.                   Type is Long Integer
  173.                   Value = 3

  174.                   Column 3:
  175.             Fixed offset: 10
  176.                   Type is Fixed Length Character String
  177.                       74686973 20697320 33202020 20202020    this is 3      
  178.                 20202020 20202020 20202020 20202020                    
  179.                 20202020 20202020 20202020 20202020                    
  180.                 2020                                                   
  181. ….
复制代码


上面的信息描述了TAB2表的第一个page。

  1. Table-object-ID: 5; Tablespace-ID: 2; First-page: 0; Number-pages: 1; Verbose: y
复制代码


然后下面有一条

  1. FYI: An active connection to the database has been detected.
  2.      False errors may be reported.  
  3.      Deactivate all connections and re-run to verify.
复制代码

这个是说明,当我们在做db2dart的时候,数据库还存在连接。
一般来说,db2dart需要数据库offline,因为只有在offline的时候,我们才能够保证磁盘上的数据是真实的。否则有可能一个数据页在内存中被修改了但是还没有flush到磁盘上。不过在这个测试里面,我们不会对数据进行任何操作,因此磁盘上的数据不会被改变。

然后下面的部分就是BPS Page Header。这一部分描述了页的头,具体的数据结构我不想多说,但是用户可以从db2dart的输出里面看到很多咚咚了。

譬如在这个例子里面,我们有

  1.          BPS Page Header:

  2.                      Page Data Offset = 48
  3.                      Page Data Length = 4048
  4.                              Page LSN = 0000 0330 33A5
  5.                    Object Page Number = 0
  6.                      Pool Page Number = 256
  7.                             Object ID = 5
  8.                           Object Type = Data Object

  9.                Data Page Header:

  10.                            Slot Count = 44
  11.                      Total Free Space = 36
  12.                   Total Reserve Space = 0
  13.                Youngest Reserve Space = n/a
  14.                          Youngest TID = n/a
  15.                     Free Space Offset = 123
  16.                   Maximum Record Size = 69

复制代码

别忘了对比/v h的输出

  1.          Page 0 of object 5 from table space 2.


  2.         0000  *00300FD0 00000048 04000000 033033A5*     *.0.....H.....03.*
  3.         0010  *00000100 0005000A 93214E97 00000000*     *..........N.....*
  4.         0020  *00000002 00000020 00000000 00000000*     *................*
  5.         0030  *002C0024 00000000 0045007B 00000000*     *.........E......*
  6.         0040  *00000000 0F9C0BB0 0B640B44 0AFF0ABA*     *.........d.D....*
  7.         0050  *0A750A30 09EB09A6 0961091C 08D70892*     *.u.0.....a......*
  8.         0060  *084D0808 07C3077E 073906F4 06AF066A*     *.M.......9.....j*
  9.         0070  *062505E0 059B0556 051104CC 04870442*     *.......V.......B*
  10.         0080  *03FD03B8 0373032E 02E902A4 025F021A*     *.....s..........*
  11.         0090  *01D50190 014B0106 00C1007C 00000000*     *.....K..........*
  12.         00A0  *00000000 00000000 00000000 00000000*     *................*
  13.         00B0  *00000000 00000000 00000000 00000000*     *................*
  14.         00C0  *10000045 0100003D 00000028 00000000*     *...E............*
  15.         00D0  *28007468 69732069 73203430 20202020*     *..this.is.40....*
  16.         00E0  *20202020 20202020 20202020 20202020*     *................*
  17.         00F0  *20202020 20202020 20202020 20202020*     *................*
  18.         0100  *20202020 00100000 45010000 3D000000*     *........E.......*
  19.         0110  *27000000 00270074 68697320 69732033*     *.......this.is.3*
  20.         0120  *39202020 20202020 20202020 20202020*     *9...............*
  21.         0130  *20202020 20202020 20202020 20202020*     *................*
  22.         0140  *20202020 20202020 20001000 00450100*     *.............E..*
  23.         0150  *003D0000 00260000 00002600 74686973*     *............this*
  24.         0160  *20697320 33382020 20202020 20202020*     *.is.38..........*
复制代码

第一个Page Data Offset = 48,我们翻译成16进制就是0x30,那么对应到raw dump,我们可以猜它就是最开始的两个字节。

依此类推,在这里不再多说。

下面我们要讨论的是slot。

大家可能听说过RID,也很困惑RID是什么咚咚(只知道是指向某一个record的,但是不知道具体是怎么指的)。

一般说来,RID在v8里面是4字节,在v9里面的large tablespace(默认)是6字节。

4字节的版本是3字节page id加上1字节的slot。6字节版本是4字节page id加上2字节的slot。(也就是说在4字节版本中,一个表在一个分区里面最多可以有2^24页。在6字节版本里面,则是2^32页。乘以每个页的大小,就是表在一个分区中最大的尺寸)。

而slot则是表明在一个page里面,一行记录的起始offset。

大家可能要问,怎么能用1个字节来标明32K页中的offset呢?

在每一个数据页中,在page header之下会有一段空间来存储每一行所在的起始位置。每一个offset相当于一个指针,指向这个page里面所对应行的位置。然后这个 offset 在这个slot list里面相对的位置就是其slot number。

譬如说

  1. char* stringList[100];
  2. stringList[0]=”hello world”;
  3. stringList[1]=”mystring”;
  4. stringList[2]=”mystring1”;
复制代码

实际上,上面这种大家经常用到的数据结构就是类似slot的结构。其中0,1,2代表这个slot number,每一个pointer都指向内存中的一个offset,对应这一个字符串。

让我们回到刚才的数据:
            Slot 0:

               Offset Location = 3996  (xF9C)
               Record Length = 32  (x20)

               Record Type = Data Object Header Control Record

                  Page count = 1787
         Object Creation LSN = 0000 0106 AE3E
                Object State = x0000
          UDI Since Runstats = 99958
                  DFH flag bits = x00000000

            Slot 1:

               Offset Location = 2992  (xBB0)
               Record Length = 1004  (x3EC)

               Record Type = Free Space Control Record

               Free space entries:
                 0:    36 (x0024),    52 (x0034),    52 (x0034),    52 (x0034)
                 4:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
                 8:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
                12:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
                16:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)
                20:    52 (x0034),    52 (x0034),    52 (x0034),    52 (x0034)

我们可以看到 slot0的offset location是xF9C。如果我们在/v h的输出里面找这两个字节,我们看到

        0040  *00000000 0F9C0BB0 0B640B44 0AFF0ABA*     *.........d.D....*
        0050  *0A750A30 09EB09A6 0961091C 08D70892*     *.u.0.....a......*
        0060  *084D0808 07C3077E 073906F4 06AF066A*     *.M.......9.....j*
        0070  *062505E0 059B0556 051104CC 04870442*     *.......V.......B*
        0080  *03FD03B8 0373032E 02E902A4 025F021A*     *.....s..........*
        0090  *01D50190 014B0106 00C1007C 00000000*     *.....K..........*
        00A0  *00000000 00000000 00000000 00000000*     *................*


0F9C就是第一个record所对应的offset,而0BB0就是第二个record的offset……以此类推。

不过这些offset不是page里面真实的offset,而是相对于slot[0]所对应的offset。

在上面的例子里,0F9C对应这个0x44,那么真实的offset也就是F9C+44=FE0

  1.         0FE0  *01000020 000006FB 00000000 0106AE3E*     *................*
  2.         0FF0  *00018676 00000000 00000000 00000000*     *...v............*
复制代码


依此类推,比如第一个data record:

  1.             Slot 4:

  2.                Offset Location = 2815  (xAFF)
  3.                Record Length = 69  (x45)

  4.                Record Type = Table Data Record (FIXEDVAR)

  5.                Record Flags = 0

  6.                Fixed part length value = 61

  7.                   Column 1:
  8.             Fixed offset: 0
  9.                   Type is Long Integer
  10.                   Value = 1

  11.                   Column 2:
  12.             Fixed offset: 5
  13.                   Type is Long Integer
  14.                   Value = 1

  15.                   Column 3:
  16.             Fixed offset: 10
  17.                   Type is Fixed Length Character String
  18.                       74686973 20697320 31202020 20202020    this is 1      
  19.                 20202020 20202020 20202020 20202020                    
  20.                 20202020 20202020 20202020 20202020                    
  21.                 2020      
复制代码


其offset为xAFF,在slot里面是x4C,但是AFF依然要加x44,也就是slot[0]的位置,则真实offset就是B43,定长x45,也就是

        0B40  *20200010 00004501 00003D00 00000100*     *......E.........*
        0B50  *00000001 00746869 73206973 20312020*     *.....this.is.1..*
        0B60  *20202020 20202020 20202020 20202020*     *................*
        0B70  *20202020 20202020 20202020 20202020*     *................*
        0B80  *20202020 20202000
00000020 00000003*     *................*
        0B90  *00010004 00010000 00010004 00010005*     *................*
        0BA0  *01000032 0001000A 1000004C 00000201*     *...2.......L....*
        0BB0  *00000141 00000001 06000200 00000000*     *...A............*
        0BC0  *00000000 00000000 00000000 00000000*     *................*
        0BD0  *00000000 00000000 00000000 00000000*     *................*


其余同理……

那怎么把这么一大段数据翻译成一个一个列呢?
在一个表的 page 0 slot 3里面,存放的是Table Descriptor Record,也就是这个表里面列的信息

  1.             Slot 3:

  2.                Offset Location = 2884  (xB44)
  3.                Record Length = 32  (x20)

  4.                Record Type = Table Description Record

  5.                   Number of Columns = 3


  6.                   Column 1:
  7.                   Type is Long Integer
  8.                   Length = 4
  9.                   Allows NULLs
  10.                   Prohibits Default
  11.             Fixed offset: 0

  12.                   Column 2:
  13.                   Type is Long Integer
  14.                   Length = 4
  15.                   Allows NULLs
  16.                   Prohibits Default
  17.             Fixed offset: 5

  18.                   Column 3:
  19.                   Type is Fixed Length Character String
  20.                   Length = 50
  21.                   Allows NULLs
  22.                   Prohibits Default
  23.             Fixed offset: 10
复制代码

我们可以看到,这个表有3个column,前两个是Long Integer,4字节长度,允许NULL,第三个是定长char(50),允许NULL。

好,对应真正的数据

        0B40  *20200010 00004501 00003D00 00000100*     *......E.........*
        0B50  *00000001 00746869 73206973 20312020*     *.....this.is.1..*
        0B60  *20202020 20202020 20202020 20202020*     *................*
        0B70  *20202020 20202020 20202020 20202020*     *................*
        0B80  *20202020 20202000
00000020 00000003*     *................*


我们看到了什么?我们通过对比SELECT出来的第一行,知道前两个column是1,第三个是this is 1
那么相对应的,蓝色部分代表第一个column,最后一个字节00代表不是NULL,而黄色部分就是第二个column。剩下的就是一串50字节的字符串,最后的00是代表非NULL的字节。 (如果一个column是不允许NULL的,那么就会在数据里面每一行节省下一字节,不用标明是否为NULL咯)。

那么蓝色之前的红色代表什么?
看看

  1.                Offset Location = 2815  (xAFF)
  2.                Record Length = 69  (x45)

  3.                Record Type = Table Data Record (FIXEDVAR)

  4.                Record Flags = 0

  5.                Fixed part length value = 61
复制代码

对比

  1. 10 00004501 00003D
复制代码

应该能够明白点什么吧 :)

不多说了,这里抛砖引玉,具体用法大家具体摸索



[ 本帖最后由 wangzhonnew 于 2009-11-14 05:17 编辑 ]
论坛徽章:
6
授权会员
日期:2007-03-09 13:32:40会员2007贡献徽章
日期:2007-09-26 18:42:10ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44生肖徽章2007版:虎
日期:2009-05-01 12:32:43生肖徽章2007版:猴
日期:2009-11-15 15:29:382010年世界杯参赛球队:洪都拉斯
日期:2010-04-23 19:14:33
2#
发表于 2009-11-14 15:12 | 只看该作者
不错,顶

使用道具 举报

回复
论坛徽章:
5
2009日食纪念
日期:2009-07-22 09:30:00祖国60周年纪念徽章
日期:2009-10-09 08:28:002010新春纪念徽章
日期:2010-01-04 08:33:082010新春纪念徽章
日期:2010-03-01 11:08:29ITPUB十周年纪念徽章
日期:2011-11-01 16:24:04
3#
发表于 2009-11-14 18:07 | 只看该作者
bookmark!

使用道具 举报

回复
论坛徽章:
9
2009日食纪念
日期:2009-07-22 09:30:00ITPUB8周年纪念徽章
日期:2009-09-27 10:21:21祖国60周年纪念徽章
日期:2009-10-09 08:28:002010新春纪念徽章
日期:2010-03-01 11:19:10ITPUB9周年纪念徽章
日期:2010-10-08 09:31:22ITPUB十周年纪念徽章
日期:2011-11-01 16:23:262012新春纪念徽章
日期:2012-01-04 11:53:54ITPUB 11周年纪念徽章
日期:2012-10-09 18:08:152013年新春福章
日期:2013-02-25 14:51:24
4#
发表于 2009-11-16 09:57 | 只看该作者
好东东,顶。
最近参加一次9.7的培训,感觉9.7已经很强大了。
另外,我终于明白wang为何这么厉害了,
原来,toronto的培训老师都是美女啊。。。。。。

使用道具 举报

回复
论坛徽章:
1
2010新春纪念徽章
日期:2010-03-01 11:04:59
5#
发表于 2009-11-19 17:21 | 只看该作者
不错,学习了。
不过如果一张大表坏了,db2dart这么挖一下也够麻烦,能否将所有记录树军都存到一个文本文件呢?

使用道具 举报

回复
论坛徽章:
3
2009日食纪念
日期:2009-07-22 09:30:00祖国60周年纪念徽章
日期:2009-10-09 08:28:002010新春纪念徽章
日期:2010-03-01 11:20:05
6#
发表于 2009-11-19 17:31 | 只看该作者

使用道具 举报

回复
求职 : 数据库管理员
论坛徽章:
186
授权会员
日期:2008-07-27 22:25:202014年新春福章
日期:2014-02-18 16:42:02马上有房
日期:2014-02-18 16:42:02马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上加薪
日期:2014-02-19 11:55:14版主4段
日期:2015-02-26 02:21:03慢羊羊
日期:2015-03-04 14:51:35
7#
发表于 2009-11-19 18:35 | 只看该作者
精华帖!

使用道具 举报

回复
招聘 : c/c++研发
论坛徽章:
45
技术图书徽章
日期:2014-03-10 14:09:192012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-01-04 11:51:22ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15现任管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:50
8#
 楼主| 发表于 2009-11-19 20:24 | 只看该作者
原帖由 biti.vector 于 2009-11-19 18:31 发表
http://www.ibm.com/developerwork ... icles/dm-0906haoqy/

靠,竟然已经有人写过类似的了,罪过罪过~~~
不过好像没有/v h和/v y之间关系的映射部分~~~raw data recovery里面最关键的部分没有涉及到阿

[ 本帖最后由 wangzhonnew 于 2009-11-19 21:25 编辑 ]

使用道具 举报

回复
招聘 : c/c++研发
论坛徽章:
45
技术图书徽章
日期:2014-03-10 14:09:192012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-02-13 15:12:092012新春纪念徽章
日期:2012-01-04 11:51:22ITPUB十周年纪念徽章
日期:2011-11-01 16:21:15现任管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:50
9#
 楼主| 发表于 2009-11-19 20:34 | 只看该作者
原帖由 心飘 于 2009-11-19 18:21 发表
不错,学习了。
不过如果一张大表坏了,db2dart这么挖一下也够麻烦,能否将所有记录树军都存到一个文本文件呢?

db2dart with /DDEL option.
but it only dump the good page, which means if a page is corrupted (like CBIT error or corrupted page header), db2dart will skip that page~~~

使用道具 举报

回复
论坛徽章:
42
ITPUB元老
日期:2005-09-09 13:45:35马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14优秀写手
日期:2013-12-18 09:29:09ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:32版主3段
日期:2012-05-15 15:24:112012新春纪念徽章
日期:2012-02-13 15:13:362012新春纪念徽章
日期:2012-02-13 15:13:36
10#
发表于 2009-11-20 15:33 | 只看该作者
wangzhonnew 又出精品!

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表