精华内容
下载资源
问答
  • 6.oracle的dump理解 数据结构

    万次阅读 2016-04-23 21:51:11
    6.oracle的dump理解 数据结构 欢迎转载,转载请标明出处: 看了理论,继续来看下的数据结构,蛤蟆此处使用的是8KB,那么8KB实际使用到底是怎么样子的呢? 1 数据结构 使用MAP命令查看如下: BBED>map  File...

    6.oracle的dump理解六 块数据结构

    欢迎转载,转载请标明出处:http://blog.csdn.net/notbaron/article/details/51228533

    看了理论,继续来看下块的数据结构,蛤蟆此处使用的是8KB,那么8KB实际使用到底是怎么样子的呢?

    1     数据结构

    使用MAP命令查看如下:

    BBED>map

     File: /home/oracle/toad01.dbf(75)

     Block: 133                        Dba:0x12c00085

     KTB Data Block (Table/Cluster)

     struct kcbh, 20bytes                     @0      --块头信息,cache layer

     struct ktbbh, 72bytes                    @20     --事务信息,transaction layer

     struct kdbh, 14bytes                     @100    --对应数据头,占用14字节

     struct kdbt[1], 4bytes                   @114    --表目录*kdbt[0]指针显示值

     sb2kdbr[3]                               @118    --行目录 *kdbr[0]指针值显示状态flg

     ub1 freespace[8028]                       @124    --空闲空间

     ub1 rowdata[36]                           @8152   --行数据

     ub4tailchk                               @8188   --tail check

    这个是文件75,块133的,整个块的数据结构。可以看到行数据时从下开始增加的,空闲的空间是在中间。

    后面@开头的表示在该块的偏移。

    @0表示该块开始的地方开始。

    @20表示从第20个字节开始。那么0~19个字节就是 block-header的信息了。

    将8KB的数据展开后如下块内容部分,很难看。蛤蟆通过BBED知道了块的结构,我们将块进行划分使用不同的颜色来标注,如下颜色标注。每行32个字节,例如06a20000有4个字节,每两个16进制数就是1个字节(1个16进制数是4位,2个就是8位,8位就是一个字节)。

    可以发现表目录只有一项,因为就保存了表t1的数据,行目录3项,因为就3行数据。

    这两蛤蟆判断应该是可变的。

    网上找到一个图,比较好,如下图1


    验证了蛤蟆的猜想,不过在交易层也是有可变的。

    这个图和MAP出来的块结构信息是可以一一对应的,从上到下。

    关于块内容的逻辑结构,可以参看下图2:改图来自DSI401.pdf。DSI是Oracle内部资料,DSI是Data Server Internals的缩写,是Oracle公司内部用来培训Oracle售后工程师使用的教材.蛤蟆是在网上下的。


    根据块的逻辑结构来分析下实际DUMP得到的数据块数据,看是否能够对应起来。

    1.1     struct kcbh 块头 20字节

    06a20000 8500c012 dd6d5e81 00000106 97520000

    第1个字节:TYPE=06

    第2个字节:FMT=A2 (一般是0x02,此处是0xa2,用掩码0x0f与运算可以取出0x02(掩码是为了保护敏感信息))

    第5-8个字节:RDBA=8500c012 换成从大到小就是12C00085

    第9-12个字节:SCNBase= dd6d5e81换成从大到小就是815E6DDD

    第13-14个字节:SCNWrap=0000

    第15个字节:Seq=01 当这个byte的数据为0xff的时候标志block坏调了,出现ora-01578

    第16个字节:Flg=06

    Flg描述如下,在kcbh.h头文件中定义:

    0x01 /* new block -zeroed data area */

    0x02 /* Delayed LoggingChange advance SCN/seq */

    0x04 /* ChecK Valuesaved-block xor's to zero */

    0x08 /* Temporary block*/

    第17-18个字节:ChkVal=9752换成从大到小就是5297

    Filler当前都不使用4个字节都是0000了。

    Tail=SCNBase(低位2字节)+块类型+SCN Seq=6DDD+06+01=6DDD0601

    这20个字节的结构体如下图3

     

    1.2     struct ktbbh 事务信息80个字节

    0100000093720100 db6d5e81

     00000000 02003200 8000c01254010e00 e6a40000 7c068000 290a0f00 01200000

     dd6d5e81 af002100 2f450200 a40a8000 1311100000800000 d46d5e81 00000000

     00000000

    第21-24个字节:Tyte=01000000 表示块类型换成从大到小就是00000001 (1是DATA,2是INDEX)

    第25-28个字节:Seg/obj=93720100表示块对象换成从大到小就是0x17293

    第29-36个字节:CSC= db6d5e8100000000块上次全清除的SCN号,换成从大到小就是00000000815e6ddb

    第37字节:Fsl=02,在ITL自由列表上的第一个槽位

    第38字节:flg=00,

    第39-40字节: itc=0x3200换成从大到小就是0x0032,占2个字节。值为50(ITL 条目的个数 max 255超过会报ORA-02207 ORA-00060 ORA-00054 可能是没空间分配itl条目了或它的争用引起的,在8i中 INITRANS default为1 , 9.2.0中 INITRANS default为2,12C是50)

    第41-44字节:自由列表下一块地址8000c012换成从大到小就是12C00080

    从45字节开始就是ITL记录,每个ITL占用24个字节

    本块含有两个ITL记录

    54010e00e6a40000 7c068000 290a0f00 01200000 dd6d5e81

    af0021002f450200 a40a8000 13111000 00800000 d46d5e81

    第45-52字节,XID=54010e00 e6a40000转换过来就是0x0154.00e.0000a4e6

    第53-60字节,UBA=7c068000 290a0f00转换过来就是0x0080067c.0a29.0f

    第61-62字节,lck flag=0120,即0x2001,表示状态和锁住的行。2=0b0010,就是 - - U -,1表示锁住一行。

    C = Committed; U = Commit Upper Bound; T =Active at CSC; B = Rollback of this UBA gives before image of the ITL.

    ---- = transaction is active, or committedpending cleanout

    C--- = transaction has been committed andlocks cleaned out

    -B-- = this undo record contains the undofor this ITL entry

    --U- = transaction committed (maybe longago); SCN is an upper bound

    ---T = transaction was still active atblock cleanout SCN

    Lck 3 nibbles       

    The number of row-level locks held in theblock by this transaction.

    第63-68字节,表示scn/fsc: 0000dd6d5e81 , 转换后就是0x0000.815e6ddd

    1.3     struct kdbh数据头14个字节        

    00010300 ffff1800 741f5c1f 5c1f

    第69字节:flag=00,

    第70字节:ntab=1,块中的表数量,大于1表示是簇。

    第71字节:nrow=3,块中的行数量

    第72字节:表示frre,  First free row index entry. -1=you have toadd one

    第73字节:fsbo=0x18 Free Space Begin offset从数据头开始偏移0X18个字节,就是24个字节后就是空闲空间了。

    第74-75字节:fseo=0x1f74Free Space End offset空闲空间结束的偏移8052.

    第76-77字节:avsp=0x1f5cAvailable space in the block (pctfree and pctused) 8028个可以用字节。

    第78-79字节:tosp=0x1f5cTotal available space when all TXs commit提交后可用字节。

    1.4     struct kdbt[1]表目录4个字节

    0000 0300

    1.5     sb2 kdbr[3]行目录6个字节   

    8c1f801f741f 每个两个字节,分别是0x1f8c,0x1f80,0x1f74分别是8076,8064,,8052(块共8192)

    1.6     ub1 freespace空闲空间8028个字节

    都是000000000。

    1.7     ub1 rowdata行数据36个字节

    2c010202 c1040544  444444442c000202 c1030542 42424242 2c000202 c1020541 42434544

    在此块中每行占用12个字节。

    如前面12个字节

    2c010202 c1040544  44444444

    第一个字节:2c表示--H-FL- -,用比特位表示就是0010 1100 ,16进制就是2C,就是第一个字节

    第二个字节:01 ,是lb(lock byte)是锁字节,和ITL中的行锁一样。影响了多少行

    第三个字节:02,表示列数量,2个列

    第四个字节:02,表示第一个列的字节数是2个

    第五,六字节:第一个列的内容:c1 04

    3存储在数据库就是c1 04

    如下测试:

    SQL> select dump(3,16) from dual;

    DUMP(3,16)

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

    Typ=2 Len=2: c1,4

    第7字节:第二个列的字节数是5个

    第8~12字节:第二个列的内容:44444444,就是字符串:DDDDD

    1.8     ub4 tailchk 尾部检测4个字节

    0106dd6d

    Tail=SCNBase(低位2字节)+块类型+SCN Seq=6DDD+06+01=6DDD0601

    2     BBED DUMP的块内容

    BBED> dump dba 75,133 offset 0 count8192

     File: /home/oracle/toad01.dbf (75)

     Block: 133              Offsets:    0 to 8191           Dba:0x12c00085

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

     06a20000 8500c012 dd6d5e8100000106 975200000100000093720100 db6d5e81

     00000000 02003200 8000c01254010e00 e6a40000 7c068000 290a0f00 01200000

     dd6d5e81 af002100 2f450200 a40a8000 1311100000800000 d46d5e81 00000000

     00000000 00010300 ffff1800 741f5c1f5c1f0000 03008c1f 801f741f00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000

     00000000 00000000 0000000000000000 00000000 000000002c010202 c1040544

     44444444 2c000202 c103054242424242 2c000202 c1020541 424345440106dd6d

     <32 bytes per line>

    3     ALTER SYSTEM DUMP DATAFILE内容

    使用ALTER SYSTEMDUMP得到的值显示方式和使用BBEDDUMP得到的有些不太一样。

    这就是大小端的问题了。使用ALTERSYSTEM DUMP的,是0000A206,是小端靠后,而使用BBED的话已经是大段靠后了。

    Start dump data blocks tsn: 13 file#:75minblk 133 maxblk 133

    Block dump from cache:

    Dump of buffer cache at level 4 for pdb=0tsn=13 rdba=314572933

    Block dump from disk:

    buffer tsn: 13 rdba: 0x12c00085 (75/133)

    scn: 0x0.815e6ddd seq: 0x01 flg: 0x06 tail:0x6ddd0601

    frmt: 0x02 chkval: 0x5297 type: 0x06=transdata

    Hex dump of block: st=0, typ_found=1

    Dump of memory from 0x00007FB63DBA0200 to0x00007FB63DBA2200

    7FB63DBA0200 0000A206 12C00085 815E6DDD06010000  [.........m^.....]

    7FB63DBA0210 00005297 00000001 00017293815E6DDB  [.R.......r...m^.]

    7FB63DBA0220 00000000 00320002 12C00080000E0154  [......2.....T...]

    7FB63DBA0230 0000A4E6 0080067C 000F0A2900002001  [....|...).... ..]

    7FB63DBA0240 815E6DDD 002100AF 0002452F00800AA4  [.m^...!./E......]

    7FB63DBA0250 00101113 00008000 815E6DD400000000  [.........m^.....]

    7FB63DBA0260 00000000 00030100 0018FFFF1F5C1F74  [............t.\.]

    7FB63DBA0270 00001F5C 1F8C0003 1F741F8000000000  [\.........t.....]

    7FB63DBA0280 00000000 00000000 0000000000000000  [................]

           Repeat 500 times

    7FB63DBA21D0 00000000 00000000 0202012C440504C1  [........,......D]

    7FB63DBA21E0 44444444 0202002C 420503C142424242  [DDDD,......BBBBB]

    7FB63DBA21F0 0202002C 410502C1 444543426DDD0601  [,......ABCED...m]

    Block header dump:  0x12c00085

     Object id on Block? Y

     seg/obj: 0x17293  csc: 0x00.815e6ddb  itc: 2 flg: E  typ: 1 - DATA

        brn: 0  bdba: 0x12c00080 ver: 0x01opc: 0

        inc: 0  exflg: 0

     

     Itl          Xid                  Uba         Flag Lck        Scn/Fsc

    0x01  0x0154.00e.0000a4e6 0x0080067c.0a29.0f  --U-    1 fsc 0x0000.815e6ddd

    0x02  0x00af.021.0002452f  0x00800aa4.1113.10  C---   0  scn 0x0000.815e6dd4

    bdba: 0x12c00085

    data_block_dump,data header at0x7fb63dba0264

    ===============

    tsiz: 0x1f98

    hsiz: 0x18

    pbl: 0x7fb63dba0264

        76543210

    flag=--------

    ntab=1

    nrow=3

    frre=-1

    fsbo=0x18

    fseo=0x1f74

    avsp=0x1f5c

    tosp=0x1f5c

    0xe:pti[0]       nrow=3   offs=0

    0x12:pri[0]     offs=0x1f8c

    0x14:pri[1]     offs=0x1f80

    0x16:pri[2]     offs=0x1f74

    block_row_dump:

    tab 0, row 0, @0x1f8c

    tl: 12 fb: --H-FL-- lb: 0x0  cc: 2

    col 0: [ 2]  c1 02

    col 1: [ 5]  41 42 43 45 44

    tab 0, row 1, @0x1f80

    tl: 12 fb: --H-FL-- lb: 0x0  cc: 2

    col 0: [ 2]  c1 03

    col 1: [ 5]  42 42 42 42 42

    tab 0, row 2, @0x1f74

    tl: 12 fb: --H-FL-- lb: 0x1  cc: 2

    col 0: [ 2]  c1 04

    col 1: [ 5]  44 44 44 44 44

    end_of_block_dump

    End dump data blocks tsn: 13 file#: 75minblk 133 maxblk 133

    4     DD命令DUMP块内容

    此外还可以使用操作系统的命令来DUMP块内容,命令如下:

    #dd bs=8192 if=toad01.dbf skip=133 count=1 | od –x> file.out

    Dump数据文件toad01.dbf中的第134个BLOCK(133#)

    #vi file.out

    内容如下,区别就是是2个字节一小段

    0000000 a206 0000 0085 12c0 6ddd 815e 00000601

    0000020 5297 0000 0001 0000 7293 0001 6ddb815e

    0000040 0000 0000 0002 0032 0080 12c0 0154000e

    0000060 a4e6 0000 067c 0080 0a29 000f 20010000

    0000100 6ddd 815e 00af 0021 452f 0002 0aa40080

    0000120 1113 0010 8000 0000 6dd4 815e 00000000

    0000140 0000 0000 0100 0003 ffff 0018 1f74 1f5c

    0000160 1f5c 0000 0003 1f8c 1f80 1f74 00000000

    0000200 0000 0000 0000 0000 0000 0000 00000000

    *

    0017720 0000 0000 0000 0000 012c 0202 04c14405

    0017740 4444 4444 002c 0202 03c1 4205 42424242

    0017760 002c 0202 02c1 4105 4342 4445 06016ddd

    0020000

     

     

     

     

     

     

     

     

    展开全文
  • 乐高基金会的六块积木理论,非常经典的DEMO课程蓝本。乐高基金会的六块积木理论,非常经典的DEMO课程蓝本。乐高基金会的六块积木理论,非常经典的乐高DEMO课程蓝本。
  • centos7 6块盘 RAID5 一块热备盘

    千次阅读 2019-03-19 17:59:12
    准备6块规格一样大小的盘 安装mdadm工具yum install mdadm准备的盘分别是 /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg先用5块盘做RAID5,剩下的一个盘做热备mdadm -Cv /dev/md0 -l5 -n5 /dev/sdb /dev/...

    准备6块规格一样大小的盘

    安装mdadm工具
    yum install mdadm
    准备的盘分别是 /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg
    先用5块盘做RAID5,剩下的一个盘做热备
    mdadm -Cv /dev/md0 -l5 -n5 /dev/sdb /dev/sdc /dev/sde /dev/sdf /dev/sdg
    说明:-l5 做RAID5
    -n5 使用5块盘
    查看相关磁盘信息
    cat /proc/mdstat
    centos7  6块盘 RAID5 一块热备盘

    用剩下的一个盘做热备
    mdadm /dev/md0 -a /dev/sdd
    下面出现了spare 设备
    centos7  6块盘 RAID5 一块热备盘

    将热备盘 spare设备添加到RAID中
    mdadm -G /dev/md0 -n6
    格式化 /dev/md0
    mkfs.xfs /dev/md0
    然后挂载即可

    转载于:https://blog.51cto.com/wsl12105/2365526

    展开全文
  • [其它]六块智力拼球步骤

    千次阅读 2019-10-02 16:39:38
    1. 首先按照以下顺序放置,依次编号123456,安装顺序也是按照此顺序 2. 编号1+编号2 3. +编号3 ...6.编号5 已插入 7.+编号6 完成 转载于:https://www.cnblogs.com/fanbi/p/11441593.html...

    1. 首先按照以下顺序放置,依次编号123456,安装顺序也是按照此顺序

     2. 编号1+编号2

     

    3. +编号3

    4. +编号4

    5.+编号5 未插入

    6.编号5 已插入

     7.+编号6 完成

    转载于:https://www.cnblogs.com/fanbi/p/11441593.html

    展开全文
  • 1、HTML元素 ...元素在显示时,通常会以新行开始,如、、,也是元素(容器) 2、HTML内联元素 内联元素通常不会以新行开始如:、、,也是内联元素(一般文本容器) 3、div容器包裹,配合样式使用

    1、HTML块元素

    块元素在显示时,通常会以新行开始,如<h1>、<p>、<ul>,<div>也是块元素(容器)

    2、HTML内联元素

    内联元素通常不会以新行开始如:<b>、<a>、<img>,<span>也是内联元素(一般文本容器)

    3、div容器包裹,配合样式使用

    展开全文
  • 因为x1 x2 x3 对应y1 y2 y3 但是不是一一对应,把X的空间分割成为6块才是分别一一对应,所以一定要把这块全部加起来 转载于:https://www.cnblogs.com/china520/p/10999715.html...
  • DELL POWEREDGE 2850服务器,内置6块300G SCSI硬盘 ,组成RAID5,安装LINUX REDHAT 4操作系统,存储大量照片,文件系统采用EXT3。据后期推断,早先已有一块硬盘离线,但机房内并未发现,直至另一块硬盘掉线后系统...
  • 构造代码的特点:对像一建立就运行了,而且优先于构造函数执行 作用:给对像进行初始化的 构造代码和构造法方的区别: 构造方法是对应的对象进行初始化, 构造代码是给所有的对像进行统一的初始化 构造代码...
  • CUDA从入门到精通():并行

    千次阅读 2013-07-23 22:08:37
    并行相当于操作系统中多进程的情况,上节说到,CUDA有线程组(线程)的概念,将一组线程组织到一起,共同分配一部分资源,然后内部调度执行。线程与线程之间,毫无瓜葛。这有利于做更粗粒度的并行。我们将上...
  • 可以用在多GPU的服务器上,明确使用的是哪GPU,可以将信息打印出来,返回的是device的列表。 具体用到的pytorch函数是torch.cuda.device_count(),返回可得到的GPU数量。 接下来是具体函数代码,分为两部分,一...
  • ObjectARX编程() ------和属性

    千次阅读 2017-05-25 16:17:01
    1. 的新增 cstring blkname; //获取当前图形数据库 AcDbBlockTable* pBlkTbl = NULL; acdbHostApplicationServices()->workingDatabase()->getBlockTable(pBlkTbl,AcDb::kForWrite); //创建新...
  • Finally block hello
  • FreeRTOS笔记()列表与任务控制

    千次阅读 2018-12-21 18:17:59
    文章目录01 - 列表02 - 列表与任务控制03 - 总结 上一文链接:FreeRTOS笔记(五)任务状态 01 - 列表   上一文提及到,任务具有多种状态,例如就绪、运行、阻塞等等,如果有多个任务都处于某一状态,例如...
  • 快速抢答:一块豆腐,六面都涂上颜色。 横向、纵向、平向各切两刀,有几块六面全是白色的? 各切三刀呢? 各切9刀呢? 各切N刀呢? 。。。。。。
  • 用户是一组6块750G磁盘的 RAID6,先后有两块磁盘离线,但维护人员在此情况下依然没有更换磁盘,所以在第三块硬盘离线后raid直接崩溃了。由此导致数据全部丢失。  这台服务器是WEB服务器,运行MYSQL数据库,同时...
  • plc通讯FC5、FC6

    千次阅读 2012-06-21 11:47:51
    FC5(AG——SEND)既可以用于PROFIBUS FDL(现场总线数据链路层通信协议)(发送数据到PROFIBUS,用于在一个已经组态的FDL连接上进行数据传输),也可以将数据传送到以太网CP上,用于在一个已经组态的ISO传输连接...
  • 当前线程 : t1 进入lock1执行 当前线程 : t2 进入lock2执行

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 1,617,264
精华内容 646,905
关键字:

六块六