ITPub博客

首页 > 数据库 > Oracle > [20181212]truncate的另类恢复5.txt

[20181212]truncate的另类恢复5.txt

原创 Oracle 作者:lfree 时间:2018-12-12 15:14:27 0 删除 编辑

[20181212]truncate的另类恢复5.txt


--//前一阵子,尝试了truncate的恢复,链接如下:

http://blog.itpub.net/267265/viewspace-2156936/

http://blog.itpub.net/267265/viewspace-2157144/


--//上午尝试了truncate reuse storage的恢复,链接如下:

http://blog.itpub.net/267265/viewspace-2284921/


--//通过修改数据字典,段头的高低水位信息以及段号,相对容易完成修复,通过redo转储获得truncate前的信息.

--//在实际上操作中很少有人使用truncate reuse storage,如果直接truncate,这样Extent Map,Auxillary Map被删除.

--//这样恢复难度相对有点大,下午尝试这样的恢复.


1.环境:

1.环境:

SCOTT@book> @ ver1

PORT_STRING                    VERSION        BANNER

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

x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production


2.建立测试环境:

SCOTT@book> create table t as select * from all_objects ;

Table created.


SCOTT@book> select object_id,data_object_id from dba_objects where owner=user and object_name='T';

 OBJECT_ID DATA_OBJECT_ID

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

     90557          90557


SCOTT@book> select count(*) from t;

  COUNT(*)

----------

     84767


SCOTT@book> column PARTITION_NAME noprint

SCOTT@book> select * from dba_extents where owner=user and segment_name='T';

OWNER SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME EXTENT_ID FILE_ID BLOCK_ID   BYTES BLOCKS RELATIVE_FNO

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

SCOTT T            TABLE        USERS                   0       4      520   65536      8            4

SCOTT T            TABLE        USERS                   1       4      528   65536      8            4

SCOTT T            TABLE        USERS                   2       4      536   65536      8            4

SCOTT T            TABLE        USERS                   3       4      544   65536      8            4

SCOTT T            TABLE        USERS                   4       4      552   65536      8            4

SCOTT T            TABLE        USERS                   5       4      560   65536      8            4

SCOTT T            TABLE        USERS                   6       4      672   65536      8            4

SCOTT T            TABLE        USERS                   7       4      680   65536      8            4

SCOTT T            TABLE        USERS                   8       4      688   65536      8            4

SCOTT T            TABLE        USERS                   9       4      696   65536      8            4

SCOTT T            TABLE        USERS                  10       4      704   65536      8            4

SCOTT T            TABLE        USERS                  11       4      712   65536      8            4

SCOTT T            TABLE        USERS                  12       4      720   65536      8            4

SCOTT T            TABLE        USERS                  13       4      728   65536      8            4

SCOTT T            TABLE        USERS                  14       4      736   65536      8            4

SCOTT T            TABLE        USERS                  15       4      744   65536      8            4

SCOTT T            TABLE        USERS                  16       4      768 1048576    128            4

SCOTT T            TABLE        USERS                  17       4      896 1048576    128            4

SCOTT T            TABLE        USERS                  18       4     1024 1048576    128            4

SCOTT T            TABLE        USERS                  19       4     1152 1048576    128            4

SCOTT T            TABLE        USERS                  20       4     1280 1048576    128            4

SCOTT T            TABLE        USERS                  21       4     1408 1048576    128            4

SCOTT T            TABLE        USERS                  22       4     1536 1048576    128            4

SCOTT T            TABLE        USERS                  23       4     1664 1048576    128            4

SCOTT T            TABLE        USERS                  24       4     1792 1048576    128            4

25 rows selected.


SCOTT@book> select SEGMENT_NAME,HEADER_FILE,HEADER_BLOCK from dba_segments where owner=user and segment_name='T';

SEGMENT_NAME         HEADER_FILE HEADER_BLOCK

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

T                              4          522


3.建立执行脚本:

$ cat tr.txt

column member new_value v_member

column member noprint

set numw 12

pause run alter system archive log current or alter system switch logfile;

--//12c不允许在pluggable database执行这条命令

alter system archive log current;

SELECT  member FROM v$log a, v$logfile b WHERE a.group#(+) = b.group# and a.STATUS='CURRENT' and rownum=1;


column curr1 new_value v_curr1

select current_scn curr1 from v$database;


--//以下操作内容:

truncate table t ;


column curr2 new_value v_curr2

select current_scn curr2 from v$database;


prompt exec DBMS_LOGMNR.START_LOGMNR(STARTSCN => &&v_curr1 ,ENDSCN  => &&v_curr2 ,OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG + DBMS_LOGMNR.CONTINUOUS_MINE);

prompt alter system dump logfile '&&v_member' scn min &&v_curr1 scn max &&v_curr2;

alter system dump logfile '&&v_member' scn min &&v_curr1 scn max &&v_curr2;


SCOTT@book> @ tr.txt

run alter system archive log current or alter system switch logfile

System altered.

       CURR1

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

 13815795309

Table truncated.

       CURR2

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

 13815795378


exec DBMS_LOGMNR.START_LOGMNR(STARTSCN =>  13815795309 ,ENDSCN  =>  13815795378 ,OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG + DBMS_LOGMNR.CONTINUOUS_MINE)

alter system dump logfile '/mnt/ramdisk/book/redo03.log' scn min  13815795309 scn max  13815795378

System altered.


--//前面我已经做了修复高低水位的恢复.


$ egrep -A1 "^Low HWM|High HWM" /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_9704.trc

Low HWM

      Highwater::  0x01000757  ext#: 24     blk#: 87     ext size: 128

--

High HWM

      Highwater::  0x01000757  ext#: 24     blk#: 87     ext size: 128

--

Low HWM

      Highwater::  0x0100020b  ext#: 0      blk#: 3      ext size: 8

--

High HWM

      Highwater::  0x0100020b  ext#: 0      blk#: 3      ext size: 8


--//通过转储日志很容易获得高低水位信息.

SCOTT@book> select object_id,data_object_id from dba_objects where owner=user and object_name='T';

 OBJECT_ID DATA_OBJECT_ID

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

     90557          90558

--//段号也很容易获得.


4.恢复.

--//首先恢复数据字段:

UPDATE tab$ set dataobj#=90557  where obj#=90557;

UPDATE seg$ set hwmincr=90557   where hwmincr=90558;

update obj$ set dataobj#=90557  where obj#=90557;

commit ;


SYS@book> alter system flush buffer_cache;

System altered.


SYS@book> alter system flush shared_pool ;

System altered.


SCOTT@book> select * from t where rowid=dbms_rowid.ROWID_CREATE(1,90557,4, 523 ,0);

OWNER  OBJECT_NAME SUBOBJECT_  OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED             LAST_DDL_TIME       TIMESTAMP           STATUS  T G S  NAMESPACE EDITION_NAME

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

SYS    ICOL$                          20              2 TABLE       2013-08-24 11:37:35 2013-08-24 11:47:37 2013-08-24:11:37:35 VALID   N N N          1

--//能查询到,说明以上修改没有问题。


5.修复段头高低水位相关信息以及段号.

segment header 每个 offset 对应的含义,如下:

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

offset     desc

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

36         total extents

40         total blocks

48         高HWM的ext#

52         高HWM的blk#(从0开始)

56         高HWM的ext size#

60         高HWM的dba地址

          

76         高HWM下有多少个block  

          

92         低HWM的ext#

96         低HWM的blk#(从0开始)

100        低HWM的ext size

104        低HWM的dba地址

          

120        高LHWM下有多少个block   

124        Level 1 BMB for High HWM block

128        Level 1 BMB for Low HWM block

213        block size   

220        L2 Array start offset

224        First Level 3 BMB

228        L2 Hint for inserts   

236        Last Level 1 BMB

240        Last Level II BMB

244        Last Level III BMB

264        extents

272        obj#  

280        ext#为0的block_id

284        ext#为0的extent blocks

288        ext#为1的block_id

292        ext#为1的extent blocks

......            以此类推循环

2736       aux map信息,ext#为0的L1 dba

2740       aux map信息,ext#为0的data dba  

2744       aux map信息,ext#为1的L1 dba

2748       aux map信息,ext#为1的data dba  

......            以此类推循环

5192       Second Level Bitmap block DBAs  


$ egrep -A1 "^Low HWM|High HWM" /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_9704.trc

Low HWM

      Highwater::  0x01000757  ext#: 24     blk#: 87     ext size: 128

--

High HWM

      Highwater::  0x01000757  ext#: 24     blk#: 87     ext size: 128

--

Low HWM

      Highwater::  0x0100020b  ext#: 0      blk#: 3      ext size: 8

--

High HWM

      Highwater::  0x0100020b  ext#: 0      blk#: 3      ext size: 8


--// 25=0x19 24=0x18 87=0x57 128=0x80

--// 0x01000757 大小头对调 57 07 00 01 


m /x 19 offset 36      --//total extents

m /x 19 offset 264     --//extents

--//32+16=48 开始每4各字节分别 高HWM的ext#,高HWM的blk#,高HWM的ext size. 高HWM的dba地址.

--//64+28=92 开始每4各字节分别 低HWM的ext#,低HWM的blk#,低HWM的ext size. 低HWM的dba地址.

m /x 18 offset 48      --//高HWM的ext#

m /x 57 offset 52      --//高HWM的blk#(从0开始)

m /x 80 offset 56      --//高HWM的ext size#

m /x 5707 offset 60    --//HWM的dba地址(低位)

m /x 0001 offset 62    --//HWM的dba地址(高位)


m /x 18 offset 92      --//低HWM的ext#

m /x 57 offset 96      --//低HWM的blk#(从0开始)

m /x 80 offset 100     --//低HWM的ext size

m /x 5707 offset 104   --//低HWM的dba地址(低位)

m /x 0001 offset 106   --//低HWM的dba地址(高位)

--//注意大小头问题。


--//90557=0x161bd 大小头对调 bd 61 01 00

m /x bd61 offset 272   --//修改obj#

m /x 0100 offset 274   --//修改obj#


--//整理如下,别写错了.^_^:

$ cat tr_bbed1.txt

set dba 4,522

m /x 19   offset 36    

y

m /x 19   offset 264   

m /x 18   offset 48

m /x 57   offset 52

m /x 80   offset 56

m /x 5707 offset 60

m /x 0001 offset 62


m /x 18   offset 92

m /x 57   offset 96

m /x 80   offset 100

m /x 5707 offset 104

m /x 0001 offset 106


m /x bd61 offset 272

m /x 0100 offset 274

sum apply


--//注:中间有1行y不是多余的,这样可以通过管道执行.因为是修改,中间有提示如下

Warning: contents of previous BIFILE will be lost. Proceed? (Y/N)

--//时就报错.如果害怕错误,使用copy &paste 执行吧.


$ cat tr_bbed1.txt | bbed parfile=bbed.par cmdfile=cmd.par

...


--//检查:

BBED> dump /v offset 48 count 16

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 522                               Offsets:   48 to   63                            Dba:0x0100020a

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

 18000000 57000000 80000000 57070001                                     l ....W.......W...

 <32 bytes per line>


BBED> dump /v offset 92 count 16

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 522                               Offsets:   92 to  107                            Dba:0x0100020a

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

 18000000 57000000 80000000 57070001                                     l ....W.......W...

 <32 bytes per line>


BBED> dump /v offset 272 count 8

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 522                               Offsets:  272 to  279                            Dba:0x0100020a

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

 bd610100 00000010                                                       l .a......

 <32 bytes per line>


6.修复段头Extent Map,Auxillary Map信息:

--//Extent Map

$ grep -i "ADD:" /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_9704.trc | tee ext_map.txt

   ADD: dba:0x1000700 len:128 at offset:24

   ADD: dba:0x1000680 len:128 at offset:23

   ADD: dba:0x1000600 len:128 at offset:22

   ADD: dba:0x1000580 len:128 at offset:21

   ADD: dba:0x1000500 len:128 at offset:20

   ADD: dba:0x1000480 len:128 at offset:19

   ADD: dba:0x1000400 len:128 at offset:18

   ADD: dba:0x1000380 len:128 at offset:17

   ADD: dba:0x1000300 len:128 at offset:16

   ADD: dba:0x10002e8 len:8 at offset:15

   ADD: dba:0x10002e0 len:8 at offset:14

   ADD: dba:0x10002d8 len:8 at offset:13

   ADD: dba:0x10002d0 len:8 at offset:12

   ADD: dba:0x10002c8 len:8 at offset:11

   ADD: dba:0x10002c0 len:8 at offset:10

   ADD: dba:0x10002b8 len:8 at offset:9

   ADD: dba:0x10002b0 len:8 at offset:8

   ADD: dba:0x10002a8 len:8 at offset:7

   ADD: dba:0x10002a0 len:8 at offset:6

   ADD: dba:0x1000230 len:8 at offset:5

   ADD: dba:0x1000228 len:8 at offset:4

   ADD: dba:0x1000220 len:8 at offset:3

   ADD: dba:0x1000218 len:8 at offset:2

   ADD: dba:0x1000210 len:8 at offset:1


--//Auxillary Map

$ grep -i "ADDAXT" /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_9704.trc | tee aux_map.txt

  ADDAXT: offset:24 fdba:x01000700 bdba:0x01000702

  ADDAXT: offset:23 fdba:x01000680 bdba:0x01000682

  ADDAXT: offset:22 fdba:x01000600 bdba:0x01000602

  ADDAXT: offset:21 fdba:x01000580 bdba:0x01000582

  ADDAXT: offset:20 fdba:x01000500 bdba:0x01000502

  ADDAXT: offset:19 fdba:x01000480 bdba:0x01000482

  ADDAXT: offset:18 fdba:x01000400 bdba:0x01000402

  ADDAXT: offset:17 fdba:x01000380 bdba:0x01000382

  ADDAXT: offset:16 fdba:x01000300 bdba:0x01000302

  ADDAXT: offset:15 fdba:x010002e0 bdba:0x010002e8

  ADDAXT: offset:14 fdba:x010002e0 bdba:0x010002e1

  ADDAXT: offset:13 fdba:x010002d0 bdba:0x010002d8

  ADDAXT: offset:12 fdba:x010002d0 bdba:0x010002d1

  ADDAXT: offset:11 fdba:x010002c0 bdba:0x010002c8

  ADDAXT: offset:10 fdba:x010002c0 bdba:0x010002c1

  ADDAXT: offset:9 fdba:x010002b0 bdba:0x010002b8

  ADDAXT: offset:8 fdba:x010002b0 bdba:0x010002b1

  ADDAXT: offset:7 fdba:x010002a0 bdba:0x010002a8

  ADDAXT: offset:6 fdba:x010002a0 bdba:0x010002a1

  ADDAXT: offset:5 fdba:x01000228 bdba:0x01000230

  ADDAXT: offset:4 fdba:x01000228 bdba:0x01000229

  ADDAXT: offset:3 fdba:x01000218 bdba:0x01000220

  ADDAXT: offset:2 fdba:x01000218 bdba:0x01000219

  ADDAXT: offset:1 fdba:x01000208 bdba:0x01000210

--//oracle转储还有点小问题,fdba的输出,前面的16进制少1个0.而前面Extent Map不足8位没有补0,格式不统一.

--//日志文件里面就有这些信息,剩下的事情就简单了,如何回填到原来的位置.


280        ext#为0的block_id

284        ext#为0的extent blocks

288        ext#为1的block_id             --//从这里开始

292        ext#为1的extent blocks

......            以此类推循环

2736       aux map信息,ext#为0的L1 dba 

2740       aux map信息,ext#为0的data dba  

2744       aux map信息,ext#为1的L1 dba  --//从这里开始

2748       aux map信息,ext#为1的data dba  

......            以此类推循环

--//我看了offset 280,2736的信息还在.

BBED> dump /v offset 280 count 16

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 522                               Offsets:  280 to  295                            Dba:0x0100020a

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

 08020001 08000000 00000000 00000000                                     l ................


 <32 bytes per line>


BBED> dump /v offset 2736 count 16

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 522                               Offsets: 2736 to 2751                            Dba:0x0100020a

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

 08020001 0b020001 00000000 00000000                                     l ................

<32 bytes per line>


--//仅仅offset 288,2744的信息被清空了.

--//建立如下脚本:

$ cat ext_map.sh

#! /bin/bash


cat ext_map.txt  | sed -e 's/^   ADD: //' -e 's/ at//'   | tr ": " "=;" | while read i

do

    eval $i

    dba=$(printf "%08x" $dba )

    #echo $dba  $len $offset


    a1=${dba:0:2}

    a2=${dba:2:2}

    a3=${dba:4:2}

    a4=${dba:6:2}


    #echo $a1 $a2 $a3 $a4


    offset=$((($offset-1)*8+288))

    echo m /x $a4$a3 offset $offset


    offset=$(($offset+2))

    echo m /x $a2$a1 offset $offset


    offset=$(($offset+2))

    len=$(echo "obase=16;$len"| bc)

    len=$(printf "%02s" $len )

    echo m /x $len ' ' offset $offset

    echo


done


$ . ext_map.sh  | tee  ext_map_bbed.txt

m /x 0007 offset 472

m /x 0001 offset 474

m /x 80   offset 476

...

m /x 1802 offset 296

m /x 0001 offset 298

m /x 8   offset 300


m /x 1002 offset 288

m /x 0001 offset 290

m /x 8   offset 292


$ cat aux_map.sh

#! /bin/bash

cat aux_map.txt  | sed -e 's/^  ADDAXT: //' -e 's/0x//' -e 's/x//'| tr ": " "=;" | while read i

do

    eval $i

    #echo $offset $fdba $bdba


    a1=${fdba:0:2}

    a2=${fdba:2:2}

    a3=${fdba:4:2}

    a4=${fdba:6:2}

    #echo $a1 $a2 $a3 $a4


    b1=${bdba:0:2}

    b2=${bdba:2:2}

    b3=${bdba:4:2}

    b4=${bdba:6:2}

    #echo $b1 $b2 $b3 $b4


    offset=$((($offset-1)*8+2744))

    echo m /x $a4$a3 offset $offset


    offset=$(($offset+2))

    echo m /x $a2$a1 offset $offset


    offset=$(($offset+2))

    echo m /x $b4$b3 offset $offset


    offset=$(($offset+2))

    echo m /x $b2$b1 offset $offset

    echo 


done 


$ . aux_map.sh | tee aux_map_bbed.txt

m /x 0007 offset 2928

m /x 0001 offset 2930

m /x 0207 offset 2932

m /x 0001 offset 2934

...


m /x 0802 offset 2744

m /x 0001 offset 2746

m /x 1002 offset 2748

m /x 0001 offset 2750


--//然后开头加入set dba 4,522,结尾加入sum apply.

--//注意不要忘记在m开始的第2行加入y,例子如下:

m /x 0007 offset 2928

y

m /x 0001 offset 2930


$ cat /home/oracle/xxx430/testl/ext_map_bbed.txt | bbed parfile=bbed.par cmdfile=cmd.par

$ cat /home/oracle/xxx430/testl/aux_map_bbed.txt | bbed parfile=bbed.par cmdfile=cmd.par


SCOTT@book> alter system flush buffer_cache;

System altered.


SCOTT@book> alter system flush shared_pool;

System altered.


SCOTT@book> select count(*) from t;

  COUNT(*)

----------

     84767


--//OK,成功了.


7.继续测试:

--//理论讲恢复到这里最好把表拷贝到别的表空间.

--//而且第一段的L1没有修改段号,这样恢复不能插入数据的,而且文件头的位图区并没有标识这些空间可用,必须修复.


SCOTT@book> insert into t  select * from all_objects where rownum<=1;

insert into t  select * from all_objects where rownum<=1

            *

ERROR at line 1:

ORA-00600: internal error code, arguments: [ktspgfblk3:kcbz_objdchk], [0], [0], [1], [], [], [], [], [], [], [], []


BBED> set dba 4,520

        DBA             0x01000208 (16777736 4,520)


BBED> dump /v offset 192 count 8

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 520                               Offsets:  192 to  199                            Dba:0x01000208

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

 be610100 6f4e7c37                                                       l .a..oN|7

 <32 bytes per line>


--//0x161be=90558,当前dba=4,520的数据段号还是90558.


BBED> m /x bd61 offset 192

Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 520                                                  Offsets:  192 to  199                                               Dba:0x01000208

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

 bd610100 6f4e7c37


 <64 bytes per line>


BBED> sum apply

Check value for File 4, Block 520:

current = 0xe970, required = 0xe970


--//修复数据文件头的位图区,参考链接:http://blog.itpub.net/267265/viewspace-2128411/

SYS@book> execute dbms_space_admin.TABLESPACE_REBUILD_BITMAPS('USERS');

PL/SQL procedure successfully completed.


SYS@book> alter system checkpoint ;

System altered.


--//依旧无法插入,使用10046跟踪发现.


PARSING IN CURSOR #139755626819840 len=56 dep=0 uid=83 oct=2 lid=83 tim=1544597100085300 hv=999879737 ad='7d60ee00' sqlid='26cwtxhxtjx1t'

insert into t  select * from all_objects where rownum<=1

END OF STMT

PARSE #139755626819840:c=132980,e=133583,p=0,cr=10,cu=0,mis=1,r=0,dep=0,og=1,plh=2967680183,tim=1544597100085297

WAIT #139755626819840: nam='Disk file operations I/O' ela= 50 FileOperation=2 fileno=4 filetype=2 obj#=90557 tim=1544597100089806

WAIT #139755626819840: nam='db file sequential read' ela= 12 file#=4 block#=521 blocks=1 obj#=90557 tim=1544597100089868

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

*** SESSION ID:(274.9) 2018-12-12 14:45:00.089

OBJD MISMATCH typ=33, seg.obj=-2, diskobj=90558, dsflg=4, dsobj=90557, tid=90557, cls=9


--//dba = 4,521也需要修改数据段号.


BBED> set dba 4,521

        DBA             0x01000209 (16777737 4,521)



BBED> dump /v offset 104 count 8

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 521                               Offsets:  104 to  111                            Dba:0x01000209

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

 be610100 01000000                                                       l .a......

 <32 bytes per line>


BBED> m /x bd61 offset 104

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 521                                                  Offsets:  104 to  111                                               Dba:0x01000209

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

 bd610100 01000000


 <64 bytes per line>


BBED> sum apply

Check value for File 4, Block 521:

current = 0x829f, required = 0x829f


SCOTT@book> insert into t  select * from all_objects where rownum<=1;

insert into t  select * from all_objects where rownum<=1

            *

ERROR at line 1:

ORA-00600: internal error code, arguments: [ktspgetmyb-1], [], [], [], [], [], [], [], [], [], [], []


--//不行!!放弃!!估计还有许多信息需要修改.


segment header 每个 offset 对应的含义,如下:

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

offset     desc

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

36         total extents

40         total blocks

48         高HWM的ext#

52         高HWM的blk#(从0开始)

56         高HWM的ext size#

60         高HWM的dba地址

          

76         高HWM下有多少个block  

          

92         低HWM的ext#

96         低HWM的blk#(从0开始)

100        低HWM的ext size

104        低HWM的dba地址

          

120        高LHWM下有多少个block   

124        Level 1 BMB for High HWM block

128        Level 1 BMB for Low HWM block

213        block size   

220        L2 Array start offset

224        First Level 3 BMB

228        L2 Hint for inserts   

236        Last Level 1 BMB

240        Last Level II BMB

244        Last Level III BMB

264        extents

272        obj#  

280        ext#为0的block_id

284        ext#为0的extent blocks

288        ext#为1的block_id

292        ext#为1的extent blocks

......            以此类推循环

2736       aux map信息,ext#为0的L1 dba

2740       aux map信息,ext#为0的data dba  

2744       aux map信息,ext#为1的L1 dba

2748       aux map信息,ext#为1的data dba  

......            以此类推循环

5192       Second Level Bitmap block DBAs  


BBED> dump /v offset 40 count 16

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 522                               Offsets:   40 to   55                            Dba:0x0100020a

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

 08000000 9c0a0000 18000000 57000000                                     l ............W...

 <32 bytes per line>


BBED> dump /v offset 76 count 16

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 522                               Offsets:   76 to   91                            Dba:0x0100020a

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

 00000000 00000000 00000000 00000000                                     l ................

 <32 bytes per line>


BBED> dump /v offset 120 count 16

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 522                               Offsets:  120 to  135                            Dba:0x0100020a

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

 00000000 08020001 08020001 00000000                                     l ................

 <32 bytes per line>


BBED> dump /v offset 228 count 4

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 522                               Offsets:  228 to  231                            Dba:0x0100020a

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

 09020001                                                                l ....

 <32 bytes per line>


BBED> dump /v offset 228 count 4

 File: /mnt/ramdisk/book/users01.dbf (4)

 Block: 522                               Offsets:  228 to  231                            Dba:0x0100020a

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

 09020001                                                                l ....

<32 bytes per line>


--//还有太多信息需要修改了,放弃!!


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

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    2859
  • 访问量
    6645292