Home Database Mysql Tutorial 利用BBED恢复数据文件头

利用BBED恢复数据文件头

Jun 07, 2016 pm 03:57 PM
http use recover data document

转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/31018075 @@@@@@@利用BBED模拟损坏5文件1号块(文件头) BBED copy file 4 block 4 to file 5 block 1 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5) Block: 1 Offsets: 0 to 19 Dba:0x01

转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/31018075

@@@@@@@利用BBED模拟损坏5文件1号块(文件头)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

BBED> copy file 4 block 4 to file 5 block 1

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:    0 to   19           Dba:0x01400001

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

 1ea20000 04000001 1a4b0000 00000104 99810000

 

 <32 bytes per line>

 

sys@PROD> shutdown abort;

ORACLE instance shut down.

sys@PROD> starup

SP2-0042: unknown command "starup" - rest of line ignored.

sys@PROD> startup

ORACLE instance started.

Total System Global Area  939495424 bytes

Fixed Size                  2233960 bytes

Variable Size             251660696 bytes

Database Buffers          679477248 bytes

Redo Buffers                6123520 bytes

Database mounted.

ORA-01122: database file 5 failed verification check

ORA-01110: data file 5: &#39;/u01/app/oracle/oradata/PROD/tp01.dbf&#39;

ORA-01210: data file header is media corrupt

Copy after login

BBED开始恢复

1、找个文件头覆盖

1

2

3

4

5

6

7

8

<strong>BBED> copy file 4 block 1 to file 5 block 1

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:    0 to   19           Dba:0x01400001

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

 0ba20000 01000001 00000000 00000104 edbc0000

 

 <32 bytes per line>

</strong>

Copy after login
2、进入5文件1号块

1

2

3

BBED> set file 5 block 1

        FILE#           5

        BLOCK#          1

Copy after login

(1)改块的地址5文件1号块,rdba_kcbh

1

2

3

4

5

6

7

8

9

10

11

12

13

BBED> p kcvfhbfh

struct kcvfhbfh, 20 bytes                   @0      

   ub1 type_kcbh                            @0        0x0b

   ub1 frmt_kcbh                            @1        0xa2

   ub1 spare1_kcbh                          @2        0x00

   ub1 spare2_kcbh                          @3        0x00

   ub4 rdba_kcbh                            @4        0x01000001

   ub4 bas_kcbh                             @8        0x00000000

   ub2 wrp_kcbh                             @12       0x0000

   ub1 seq_kcbh                             @14       0x01

   ub1 flg_kcbh                             @15       0x04 (KCBHFCKV)

   ub2 chkval_kcbh                          @16       0xbced

   ub2 spare3_kcbh                          @18       0x0000

Copy after login

1

2

3

4

5

6

7

8

9

10

11

BBED> d /v offset 4

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:    4 to   23  Dba:0x01400001

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

 01000001 00000000 00000104 edbc0000 l ............&iacute;?..

 00000000   

BBED> m /x  01004001 offset 4

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:    4 to   23           Dba:0x01400001

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

 01004001 00000000 00000104 edbc0000 00000000

Copy after login

(2)文件的大小kccfhfsz

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

BBED> p kcvfhhdr

struct kcvfhhdr, 76 bytes                   @20     

   ub4 kccfhswv                             @20       0x00000000

   ub4 kccfhcvn                             @24       0x0b200000

   ub4 kccfhdbi                             @28       0x0f302c3e

   text kccfhdbn[0]                         @32      P

   text kccfhdbn[1]                         @33      R

   text kccfhdbn[2]                         @34      O

   text kccfhdbn[3]                         @35      D

   text kccfhdbn[4]                         @36      

   text kccfhdbn[5]                         @37      

   text kccfhdbn[6]                         @38      

   text kccfhdbn[7]                         @39      

   ub4 kccfhcsq                             @40       0x00000d3d

   ub4 kccfhfsz                             @44       0x00003200

   s_blkz kccfhbsz                          @48       0x00

   ub2 kccfhfno                             @52       0x0004

   ub2 kccfhtyp                             @54       0x0003

   ub4 kccfhacid                            @56       0x00000000

   ub4 kccfhcks                             @60       0x00000000

   text kccfhtag[0]                         @64      

 ....................   

sys@PROD> select name from v$dbfile where file#=5;

 

NAME

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

/u01/app/oracle/oradata/PROD/tp01.dbf

 

[oracle@jfdb PROD]$ ls -lFtr |grep tp01

-rw-r-----. 1 oracle oinstall  524296192 Jun  8 18:58 tp01.dbf

 

sys@PROD> select 524296192/8192 from dual;

 

524296192/8192

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

         64001

Copy after login

1

2

3

4

5

6

7

8

9

10

11

BBED> d /v offset 44

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:   44 to   63  Dba:0x01400001

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

 00320000 00200000 04000300 00000000 l .2... ..........

 00000000

BBED> m /x 00fa0000 44

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:   44 to   63           Dba:0x01400001

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

 00fa0000 00200000 04000300 00000000 00000000

Copy after login

(3)修改文件号(4--->5)

ub2 kccfhfno @52 0x0004

1

2

3

4

5

6

7

8

9

10

11

12

BBED> d /v offset 52

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:   52 to   71  Dba:0x01400001

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

 04000300 00000000 00000000 00000000 l ................

 00000000

 

BBED> m /x 05 offset 52

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:   52 to   71           Dba:0x01400001

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

 05000300 00000000 00000000 00000000 00000000

Copy after login

(4)修改文件创建时SCN

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

BBED> p kcvfhcrs

struct kcvfhcrs, 8 bytes                    @100    

   ub4 kscnbas                              @100      0x00004b14

   ub2 kscnwrp                              @104      0x0000

 

 

sys@PROD> select file#,CREATION_CHANGE# from v$datafile where file#=5;

 

     FILE# CREATION_CHANGE#

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

         5           363921

 

sys@PROD> select to_char(&#39;363921&#39;,&#39;xxxxxxxxxxxxx&#39;) from dual;

 

TO_CHAR(&#39;36392

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

         58d91   ===(倒:918d0500)==》00058d91

 

BBED> d /v offset 100

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:  100 to  119  Dba:0x01400001

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

 144b0000 00000000 30cf3e32 a41da532 l .K......0?>2&curren;.¥2

 ec4f1900

 

 

BBED> m /x 918d offset 100

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:  100 to  119           Dba:0x01400001

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

 918d0000 00000000 30cf3e32 a41da532 ec4f1900

 

BBED>  m /x 0500 offset 102

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:  102 to  121           Dba:0x01400001

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

 05000000 000030cf 3e32a41d a532ec4f 19000000

 

BBED> d /v offset 100

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:  100 to  119  Dba:0x01400001

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

 918d0500 00000000 30cf3e32 a41da532 l ........0?>2&curren;.¥2

 ec4f1900

Copy after login

(5)修改文件创建时间

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

ub4 kcvfhcrt                             @108      0x323ecf30

BBED> p kcvfhcrt

ub4 kcvfhcrt                                @108      0x323ecf30

 

sys@PROD> select file#,to_char(CREATION_TIME,&#39;yyyy-mm-dd hh24:mi:ss&#39;) createTime,

  2      (to_char(CREATION_TIME,&#39;yyyy&#39;)-1988)*12*31*24*3600+

  3       (to_char(CREATION_TIME,&#39;mm&#39;)-1)*31*24*3600+

  4     (to_char(CREATION_TIME,&#39;dd&#39;)-1)*24*3600+

  5     to_char(CREATION_TIME,&#39;hh24&#39;)*3600+

  6     to_char(CREATION_TIME,&#39;mi&#39;)*60+

  7     to_char(CREATION_TIME,&#39;ss&#39;) createTimeSCN

  8    from v$datafile WHERE file# in(4,5);

 

     FILE# CREATETIME          CREATETIMESCN

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

         4 2014-03-23 16:17:52     842977072

         5 2014-03-29 10:32:22     843474742

 

 

sys@PROD> select &#39;4&#39; file#, to_char(&#39;842977072&#39;,&#39;xxxxxxxxxxxxxx&#39;) from dual;

 

F TO_CHAR(&#39;842977

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

4        323ecf30    ===>倒:30cf3e32

 

 

sys@PROD> select &#39;5&#39; file#,to_char(&#39;843474742&#39;,&#39;xxxxxxxxxxxxxx&#39;) from dual;

 

sys@PROD>  select &#39;5&#39; file#,to_char(&#39;843474742&#39;,&#39;xxxxxxxxxxxxxx&#39;) from dual;

 

F TO_CHAR(&#39;843474

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

5        32466736  ==》36674632

 

BBED> d /v offset 108

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:  108 to  127  Dba:0x01400001

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

 30cf3e32 a41da532 ec4f1900 00000000 l 0?>2&curren;.¥2&igrave;O......

 d713a532

 

BBED> m /x 36674632 offset 108

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:  108 to  127           Dba:0x01400001

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

 36674632 a41da532 ec4f1900 00000000 d713a532

Copy after login

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

sword kcvfhtsn                           @332      4

 

sys@PROD> select file#,TS# from  v$datafile where file# in(4,5);

 

     FILE#        TS#

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

         4          4

         5          5

 

BBED> d /v offset 332

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:  332 to  351  Dba:0x01400001

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

 04000000 05005553 45525300 00000000 l ......USERS.....

 00000000                            l ....

 

 <16 bytes per line>

 

BBED> m /x 05 offset 332

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:  332 to  351           Dba:0x01400001

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

 05000000 05005553 45525300 00000000 00000000

Copy after login

ub4 kcvfhrfn @368 0x00000004

1

2

3

4

5

6

7

8

9

10

11

12

13

14

BBED> d /v offset 368

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:  368 to  387  Dba:0x01400001

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

 04000000 00000000 00000000 00000000 l ................

 00000000                            l ....

 

 <16 bytes per line>

 

BBED> m /x 05 offset 368

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:  368 to  387           Dba:0x01400001

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

 05000000 00000000 00000000 00000000 00000000

Copy after login

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

BBED> p kcvfhtnm

text kcvfhtnm[0]                            @338     U

text kcvfhtnm[1]                            @339     S

text kcvfhtnm[2]                            @340     E

text kcvfhtnm[3]                            @341     R

text kcvfhtnm[4]                            @342     S

text kcvfhtnm[5]                            @343     

text kcvfhtnm[6]                            @344     

text kcvfhtnm[7]                            @345     

text kcvfhtnm[8]                            @346     

text kcvfhtnm[9]                            @347     

text kcvfhtnm[10]                           @348     

text kcvfhtnm[11]                           @349     

text kcvfhtnm[12]                           @350

 

sys@PROD> select file#,TS# from  v$datafile where file# in(4,5);

 

     FILE#        TS#

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

         4          4

         5          5

 

sys@PROD> select TS#,NAME from v$tablespace where ts# in(4,5);

 

       TS# NAME

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

         4 USERS

         5 TP1

 

BBED> d /v offset 338

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:  338 to  357  Dba:0x01400001

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

 55534552 53000000 00000000 00000000 l USERS...........

 00000000

 

sys@PROD> select dump(&#39;USERS&#39;,16) from dual;

 

DUMP(&#39;USERS&#39;,16)

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

Typ=96 Len=5: 55,53,45,52,53

 

 

sys@PROD> select dump(&#39;TP1&#39;,16) from dual;

 

DUMP(&#39;TP1&#39;,16)

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

Typ=96 Len=3: 54,50,31

 

BBED> m /x 54503100 offset 338

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:  338 to  357           Dba:0x01400001

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

 54503100 53000000 00000000 00000000 00000000

 

 <32 bytes per line>

 

BBED> m /x 00 offset 342

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:  342 to  361           Dba:0x01400001

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

 00000000 00000000 00000000 00000000 00000000

 

 <32 bytes per line>

 

BBED> d /v offset 338

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:  338 to  357  Dba:0x01400001

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

 54503100 00000000 00000000 00000000 l TP1.............

 00000000

Copy after login

ub2 kcvfhtln @336 0x0005

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

BBED> d /v offset 336

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:  336 to  355  Dba:0x01400001

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

 05005450 31000000 00000000 00000000 l ..TP1...........

 00000000                            l ....

 

 <16 bytes per line>

 

BBED> m /x 03 offset 336

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:  336 to  355           Dba:0x01400001

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

 03005450 31000000 00000000 00000000 00000000

 

 <32 bytes per line>

Copy after login

(10)检查点

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

BBED> p kcvfhckp

struct kcvfhckp, 36 bytes                   @484    

   struct kcvcpscn, 8 bytes                 @484    

      ub4 kscnbas                           @484      0x0019b1a1   --->1683873

      ub2 kscnwrp                           @488      0x0000

   ub4 kcvcptim                             @492      0x32a59921   -->849713441

   ub2 kcvcpthr                             @496      0x0001

   union u, 12 bytes                        @500    

      struct kcvcprba, 12 bytes             @500    

         ub4 kcrbaseq                       @500      0x00000002

         ub4 kcrbabno                       @504      0x000002e0

         ub2 kcrbabof                       @508      0x0010

   ub1 kcvcpetb[0]                          @512      0x02

   ub1 kcvcpetb[1]                          @513      0x00

   ub1 kcvcpetb[2]                          @514      0x00

   ub1 kcvcpetb[3]                          @515      0x00

   ub1 kcvcpetb[4]                          @516      0x00

   ub1 kcvcpetb[5]                          @517      0x00

   ub1 kcvcpetb[6]                          @518      0x00

   ub1 kcvcpetb[7]                          @519      0x00

 

sys@PROD> select file#,rfile#,CREATION_TIME,checkpoint_change#,unrecoverable_change#,offline_change# from v$datafile;

 

     FILE#     RFILE# CREATION_ CHECKPOINT_CHANGE# UNRECOVERABLE_CHANGE# OFFLINE_CHANGE#

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

         1          1 23-MAR-14            1683873                     0         1658859

         2          2 23-MAR-14            1683873                     0         1658859

         3          3 23-MAR-14            1683873                     0         1658859

         4          4 23-MAR-14            1683873                     0         1658859

         5          5 29-MAR-14            1684251                     0         1658859

 

sys@PROD> select to_number(&#39;19b1a1&#39;,&#39;xxxxxxxxxxxx&#39;) from dual;

 

TO_NUMBER(&#39;19B1A1&#39;,&#39;XXXXXXXXXXXX&#39;)

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

                           1683873

sys@PROD> select to_number(&#39;32a59921&#39;,&#39;xxxxxxxxxxxx&#39;) from dual;

 

TO_NUMBER(&#39;32A59921&#39;,&#39;XXXXXXXXXXXX&#39;)

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

                           849713441

sys@PROD> select file#,to_char(CHECKPOINT_TIME,&#39;yyyy-mm-dd hh24:mi:ss&#39;) createTime,

  2    (to_char(CHECKPOINT_TIME,&#39;yyyy&#39;)-1988)*12*31*24*3600+

  3     (to_char(CHECKPOINT_TIME,&#39;mm&#39;)-1)*31*24*3600+

  4   (to_char(CHECKPOINT_TIME,&#39;dd&#39;)-1)*24*3600+

  5   to_char(CHECKPOINT_TIME,&#39;hh24&#39;)*3600+

  6    to_char(CHECKPOINT_TIME,&#39;mi&#39;)*60+

  7   to_char(CHECKPOINT_TIME,&#39;ss&#39;) createTimeSCN

  8    from v$datafile WHERE file# in(4,5);

 

 

     FILE# CREATETIME          CREATETIMESCN

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

         4 2014-06-08 15:30:41     849713441

         5 2014-06-08 15:38:33     849713913

 

sys@PROD> sys@PROD> select to_char(&#39;1684251&#39;,&#39;xxxxxxxxxxxxxxx&#39;) from dual;

 

TO_CHAR(&#39;1684251

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

          19b31b   ====>真正5号文件的检查点SCN

 

sys@PROD> select to_char(&#39;849713913&#39;,&#39;xxxxxxxxxxxxxxx&#39;) from dual;

 

TO_CHAR(&#39;8497139

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

        32a59af9  ====>真正5号文件的检查点时间

 

ub4 kscnbas                           @484      0x0019b1a1     ====>真正5号文件的检查点SCN 19b31b (倒:1bb319)

ub4 kcvcptim                          @492      0x32a59921     ====>真正5号文件的检查点时间32a59af9(倒:f99aa532)

 

BBED> d /v offset 484

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:  484 to  503  Dba:0x01400001

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

 a1b11900 00000000 2199a532 01000000 l ?&plusmn;......!.¥2....

 02000000

 

BBED> m /x 1bb319 offset 484

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:  484 to  503           Dba:0x01400001

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

 1bb31900 00000000 2199a532 01000000 02000000

 

BBED> d /v offset 492

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:  492 to  511  Dba:0x01400001

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

 2199a532 01000000 02000000 e0020000 l !.¥2........&agrave;...

 10007261

 

BBED> m /x f99a offset 492

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:  492 to  511           Dba:0x01400001

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

 f99aa532 01000000 02000000 e0020000 10007261

Copy after login

##################校验块

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

BBED> sum apply

Check value for File 5, Block 1:

current = 0x4a10, required = 0x4a10

 

BBED> verify

DBVERIFY - Verification starting

FILE = /u01/app/oracle/oradata/PROD/tp01.dbf

BLOCK = 1

 

 

DBVERIFY - Verification complete

 

Total Blocks Examined         : 1

Total Blocks Processed (Data) : 0

Total Blocks Failing   (Data) : 0

Total Blocks Processed (Index): 0

Total Blocks Failing   (Index): 0

Total Blocks Empty            : 0

Total Blocks Marked Corrupt   : 0

Total Blocks Influx           : 0

Message 531 not found;  product=RDBMS; facility=BBED

Copy after login

######################检查物理坏块

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

[oracle@jfdb PROD]$ dbv file=tp01.dbf start=1 end=2

 

DBVERIFY: Release 11.2.0.3.0 - Production on Sun Jun 8 21:48:37 2014

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

DBVERIFY - Verification starting : FILE = /u01/app/oracle/oradata/PROD/tp01.dbf

 

 

DBVERIFY - Verification complete

 

Total Pages Examined         : 2

Total Pages Processed (Data) : 0

Total Pages Failing   (Data) : 0

Total Pages Processed (Index): 0

Total Pages Failing   (Index): 0

Total Pages Processed (Other): 2

Total Pages Processed (Seg)  : 0

Total Pages Failing   (Seg)  : 0

Total Pages Empty            : 0

Total Pages Marked Corrupt   : 0

Total Pages Influx           : 0

Total Pages Encrypted        : 0

Highest block SCN            : 1687542 (0.1687542)

Copy after login

############打开数据库报错

1

2

3

4

5

6

7

8

9

10

11

12

13

14

sys@PROD> shutdown abort;

ORACLE instance shut down.

sys@PROD> startup

ORACLE instance started.

 

Total System Global Area  939495424 bytes

Fixed Size                  2233960 bytes

Variable Size             251660696 bytes

Database Buffers          679477248 bytes

Redo Buffers                6123520 bytes

Database mounted.

ORA-01122: database file 5 failed verification check

ORA-01110: data file 5: &#39;/u01/app/oracle/oradata/PROD/tp01.dbf&#39;

ORA-01207: file is more recent than control file - old control file

Copy after login

###########怀疑检查点计数器,这里我先用BBED(方法1重建控制文件,方法2利用BBED修改计算器)

ub4 kcvfhcpc @140 0x00000102

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

idle> alter session set events 'immediate trace name controlf level 8';

 

Session altered.

 

DATA FILE #5:

  name #4: /u01/app/oracle/oradata/PROD/tp01.dbf

creation size=0 block size=8192 status=0xe head=4 tail=4 dup=1

 tablespace 5, index=5 krfil=5 prev_file=0

 unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00

 Checkpoint cnt:226 scn: 0x0000.0019b31b 06/08/2014 15:38:33

 Stop scn: 0xffff.ffffffff 06/08/2014 07:44:07

 Creation Checkpointed at scn:  0x0000.00058d91 03/29/2014 10:32:22

 thread:0 rba:(0x0.0.0)

 

sys@PROD> select to_char('226','xxxxxxxxxxxxx') from dual;

 

TO_CHAR('226',

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

            e2

 

sys@PROD> select to_char('225','xxxxxxxxxxxxx') from dual;

 

TO_CHAR('225',

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

            e1

 

BBED> d /v offset 140

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:  140 to  159  Dba:0x01400001

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

 02010000 8bc6a532 01010000 b24f1900 l .....?¥2....2O..

 00000000

 

BBED> m /x e200 offset 140

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:  140 to  159           Dba:0x01400001

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

 e2000000 8bc6a532 01010000 b24f1900 00000000

 

 <32 bytes per line>

 

BBED> d /v offset 148

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1       Offsets:  148 to  167  Dba:0x01400001

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

 01010000 b24f1900 00000000 d713a532 l ....2O......×.¥2

 01000000                            l ....

 

 <16 bytes per line>

 

BBED> m /x e100 offset 148

 File: /u01/app/oracle/oradata/PROD/tp01.dbf (5)

 Block: 1                Offsets:  148 to  167           Dba:0x01400001

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

 e1000000 b24f1900 00000000 d713a532 01000000

 

 <32 bytes per line>

 

BBED> sum apply

Check value for File 5, Block 1:

current = 0x4a10, required = 0x4a10

 

BBED> verify

DBVERIFY - Verification starting

FILE = /u01/app/oracle/oradata/PROD/tp01.dbf

BLOCK = 1

 

 

DBVERIFY - Verification complete

 

Total Blocks Examined         : 1

Total Blocks Processed (Data) : 0

Total Blocks Failing   (Data) : 0

Total Blocks Processed (Index): 0

Total Blocks Failing   (Index): 0

Total Blocks Empty            : 0

Total Blocks Marked Corrupt   : 0

Total Blocks Influx           : 0

Message 531 not found;  product=RDBMS; facility=BBED

Copy after login

##########再次打开库,OK!

1

2

3

4

5

6

7

8

sys@PROD> select status from v$instance;

STATUS

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

MOUNTED

 

sys@PROD> alter database open;

 

Database altered.

Copy after login

###############################修改数据文件头的注意点:
1、修改数据的DBA,rdba_kcbh

2、修改文件的大小,kccfhfsz

3、修改文件号,kccfhfno

4、修改文件创建时SCN,kcvfhcrs

5、修改文件创建时间,kcvfhcrt

6、修改表空间号,kcvfhtsn

7、修改相对文件号,kcvfhrfn

8、修改表空间的名称, kcvfhtnm

9、修改表空间的长度,kcvfhtln

10、修改检查点的SCN,kcvfhckp

11、修改检查点的时间,kcvcptim

12、修改检查点的计数器,kcvfhcpc

13、修改检查点的控制文件备份的计数器, kcvfhccc

14、如果你修改是1号文件的1号块他的root rdba的地针是指向了bootstrap$

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Use ddrescue to recover data on Linux Use ddrescue to recover data on Linux Mar 20, 2024 pm 01:37 PM

DDREASE is a tool for recovering data from file or block devices such as hard drives, SSDs, RAM disks, CDs, DVDs and USB storage devices. It copies data from one block device to another, leaving corrupted data blocks behind and moving only good data blocks. ddreasue is a powerful recovery tool that is fully automated as it does not require any interference during recovery operations. Additionally, thanks to the ddasue map file, it can be stopped and resumed at any time. Other key features of DDREASE are as follows: It does not overwrite recovered data but fills the gaps in case of iterative recovery. However, it can be truncated if the tool is instructed to do so explicitly. Recover data from multiple files or blocks to a single

Open source! Beyond ZoeDepth! DepthFM: Fast and accurate monocular depth estimation! Open source! Beyond ZoeDepth! DepthFM: Fast and accurate monocular depth estimation! Apr 03, 2024 pm 12:04 PM

0.What does this article do? We propose DepthFM: a versatile and fast state-of-the-art generative monocular depth estimation model. In addition to traditional depth estimation tasks, DepthFM also demonstrates state-of-the-art capabilities in downstream tasks such as depth inpainting. DepthFM is efficient and can synthesize depth maps within a few inference steps. Let’s read about this work together ~ 1. Paper information title: DepthFM: FastMonocularDepthEstimationwithFlowMatching Author: MingGui, JohannesS.Fischer, UlrichPrestel, PingchuanMa, Dmytr

What to do if the 0x80004005 error code appears. The editor will teach you how to solve the 0x80004005 error code. What to do if the 0x80004005 error code appears. The editor will teach you how to solve the 0x80004005 error code. Mar 21, 2024 pm 09:17 PM

When deleting or decompressing a folder on your computer, sometimes a prompt dialog box &quot;Error 0x80004005: Unspecified Error&quot; will pop up. How should you solve this situation? There are actually many reasons why the error code 0x80004005 is prompted, but most of them are caused by viruses. We can re-register the dll to solve the problem. Below, the editor will explain to you the experience of handling the 0x80004005 error code. Some users are prompted with error code 0X80004005 when using their computers. The 0x80004005 error is mainly caused by the computer not correctly registering certain dynamic link library files, or by a firewall that does not allow HTTPS connections between the computer and the Internet. So how about

Google is ecstatic: JAX performance surpasses Pytorch and TensorFlow! It may become the fastest choice for GPU inference training Google is ecstatic: JAX performance surpasses Pytorch and TensorFlow! It may become the fastest choice for GPU inference training Apr 01, 2024 pm 07:46 PM

The performance of JAX, promoted by Google, has surpassed that of Pytorch and TensorFlow in recent benchmark tests, ranking first in 7 indicators. And the test was not done on the TPU with the best JAX performance. Although among developers, Pytorch is still more popular than Tensorflow. But in the future, perhaps more large models will be trained and run based on the JAX platform. Models Recently, the Keras team benchmarked three backends (TensorFlow, JAX, PyTorch) with the native PyTorch implementation and Keras2 with TensorFlow. First, they select a set of mainstream

Slow Cellular Data Internet Speeds on iPhone: Fixes Slow Cellular Data Internet Speeds on iPhone: Fixes May 03, 2024 pm 09:01 PM

Facing lag, slow mobile data connection on iPhone? Typically, the strength of cellular internet on your phone depends on several factors such as region, cellular network type, roaming type, etc. There are some things you can do to get a faster, more reliable cellular Internet connection. Fix 1 – Force Restart iPhone Sometimes, force restarting your device just resets a lot of things, including the cellular connection. Step 1 – Just press the volume up key once and release. Next, press the Volume Down key and release it again. Step 2 – The next part of the process is to hold the button on the right side. Let the iPhone finish restarting. Enable cellular data and check network speed. Check again Fix 2 – Change data mode While 5G offers better network speeds, it works better when the signal is weaker

The vitality of super intelligence awakens! But with the arrival of self-updating AI, mothers no longer have to worry about data bottlenecks The vitality of super intelligence awakens! But with the arrival of self-updating AI, mothers no longer have to worry about data bottlenecks Apr 29, 2024 pm 06:55 PM

I cry to death. The world is madly building big models. The data on the Internet is not enough. It is not enough at all. The training model looks like "The Hunger Games", and AI researchers around the world are worrying about how to feed these data voracious eaters. This problem is particularly prominent in multi-modal tasks. At a time when nothing could be done, a start-up team from the Department of Renmin University of China used its own new model to become the first in China to make "model-generated data feed itself" a reality. Moreover, it is a two-pronged approach on the understanding side and the generation side. Both sides can generate high-quality, multi-modal new data and provide data feedback to the model itself. What is a model? Awaker 1.0, a large multi-modal model that just appeared on the Zhongguancun Forum. Who is the team? Sophon engine. Founded by Gao Yizhao, a doctoral student at Renmin University’s Hillhouse School of Artificial Intelligence.

The U.S. Air Force showcases its first AI fighter jet with high profile! The minister personally conducted the test drive without interfering during the whole process, and 100,000 lines of code were tested for 21 times. The U.S. Air Force showcases its first AI fighter jet with high profile! The minister personally conducted the test drive without interfering during the whole process, and 100,000 lines of code were tested for 21 times. May 07, 2024 pm 05:00 PM

Recently, the military circle has been overwhelmed by the news: US military fighter jets can now complete fully automatic air combat using AI. Yes, just recently, the US military’s AI fighter jet was made public for the first time and the mystery was unveiled. The full name of this fighter is the Variable Stability Simulator Test Aircraft (VISTA). It was personally flown by the Secretary of the US Air Force to simulate a one-on-one air battle. On May 2, U.S. Air Force Secretary Frank Kendall took off in an X-62AVISTA at Edwards Air Force Base. Note that during the one-hour flight, all flight actions were completed autonomously by AI! Kendall said - "For the past few decades, we have been thinking about the unlimited potential of autonomous air-to-air combat, but it has always seemed out of reach." However now,

Alibaba 7B multi-modal document understanding large model wins new SOTA Alibaba 7B multi-modal document understanding large model wins new SOTA Apr 02, 2024 am 11:31 AM

New SOTA for multimodal document understanding capabilities! Alibaba's mPLUG team released the latest open source work mPLUG-DocOwl1.5, which proposed a series of solutions to address the four major challenges of high-resolution image text recognition, general document structure understanding, instruction following, and introduction of external knowledge. Without further ado, let’s look at the effects first. One-click recognition and conversion of charts with complex structures into Markdown format: Charts of different styles are available: More detailed text recognition and positioning can also be easily handled: Detailed explanations of document understanding can also be given: You know, "Document Understanding" is currently An important scenario for the implementation of large language models. There are many products on the market to assist document reading. Some of them mainly use OCR systems for text recognition and cooperate with LLM for text processing.

See all articles