BBED修复system01.dbf坏块过程

Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE  

[oracle@jsmn ~]$ sqlplus /nolog

 

SQL*Plus: Release 9.2.0.4.0 - Production on Tue Sep 24 09:50:44 2013

 

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

 

SQL> conn / as sysdba

Connected to an idle instance.

SQL> startup

ORACLE instance started.

 

Total System Global Area  236000356 bytes

Fixed Size                   451684 bytes

Variable Size             201326592 bytes

Database Buffers           33554432 bytes

Redo Buffers                 667648 bytes

Database mounted.

ORA-01092: ORACLE instance terminated. Disconnection forced

 

 

[oracle@jsmn bdump]$ vi alert_NINVOICE.log

Starting datafile 5 recovery in thread 1 sequence 94

Datafile 5: '/u01/oracle/oradata/NINVOICE/example01.dbf'

Starting datafile 6 recovery in thread 1 sequence 94

Datafile 6: '/u01/oracle/oradata/NINVOICE/indx01.dbf'

Starting datafile 7 recovery in thread 1 sequence 94

Datafile 7: '/u01/oracle/oradata/NINVOICE/odm01.dbf'

Starting datafile 8 recovery in thread 1 sequence 94

Datafile 8: '/u01/oracle/oradata/NINVOICE/tools01.dbf'

Starting datafile 9 recovery in thread 1 sequence 94

Datafile 9: '/u01/oracle/oradata/NINVOICE/users01.dbf'

Starting datafile 10 recovery in thread 1 sequence 94

Datafile 10: '/u01/oracle/oradata/NINVOICE/xdb01.dbf'

Starting datafile 11 recovery in thread 1 sequence 94

Datafile 11: '/u01/oracle/oradata/NINVOICE/jsgssw01.dbf'

Media Recovery Log

Recovery of Online Redo Log: Thread 1 Group 3 Seq 94 Reading mem 0

  Mem# 0 errs 0: /u01/oracle/oradata/NINVOICE/redo03.log

Media Recovery Complete

Completed: ALTER DATABASE RECOVER  database

Tue Sep 24 09:54:13 2013

alter database open

Tue Sep 24 09:54:13 2013

Beginning crash recovery of 1 threads

Tue Sep 24 09:54:13 2013

Started first pass scan

:$

 consistency value in tail: 0x76ee0601

 check value in block header: 0x5584, computed block checksum: 0x9bbc

 spare1: 0x0, spare2: 0x0, spare3: 0x0

***

Reread of rdba: 0x00400cab (file 1, block 3243) found same corrupted data

Tue Sep 24 10:27:53 2013

Errors in file /u01/oracle//admin/NINVOICE/bdump/ninvoice_smon_27918.trc:

ORA-00604: error occurred at recursive SQL level 2

ORA-01578: ORACLE data block corrupted (file # 1, block # 3243)

ORA-01110: data file 1: '/u01/oracle/oradata/NINVOICE/system01.dbf'

Tue Sep 24 10:27:53 2013

Database Characterset is AL32UTF8

Tue Sep 24 10:27:53 2013

Errors in file /u01/oracle//admin/NINVOICE/bdump/ninvoice_smon_27918.trc:

ORA-00604: error occurred at recursive SQL level 1

ORA-01578: ORACLE data block corrupted (file # 1, block # 3243)

ORA-01110: data file 1: '/u01/oracle/oradata/NINVOICE/system01.dbf'

Tue Sep 24 10:27:53 2013

Errors in file /u01/oracle//admin/NINVOICE/udump/ninvoice_ora_27930.trc:

ORA-01578: ORACLE data block corrupted (file # 1, block # 3243)

ORA-01110: data file 1: '/u01/oracle/oradata/NINVOICE/system01.dbf'

Error 1578 happened during db open, shutting down database

USER: terminating instance due to error 1578

Instance terminated by USER, pid = 27930

ORA-1092 signalled during: alter database open.

[oracle@jsmn bdump]$ vi /u01/oracle/admin/NINVOICE/udump/ninvoice_ora_27930.trc

/u01/oracle/admin/NINVOICE/udump/ninvoice_ora_27930.trc

Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.4.0 - Production

ORACLE_HOME = /u01/oracle/product/9.2.0/

System name:    Linux

Node name:      jsmn

Release:        2.6.9-78.0.0.0.1.ELsmp

Version:        #1 SMP Fri Jul 25 14:41:56 EDT 2008

Machine:        i686

Instance name: NINVOICE

Redo thread mounted by this instance: 1

Oracle process number: 12

Unix process pid: 27930, image: oracle@jsmn (TNS V1-V3)

 

*** SESSION ID:(9.3) 2013-09-24 10:27:52.979

Thread 1 recovery from rba:0x000060.00000002.0010 scn:0x0000.008fad1c

----- Redo read statistics for thread 1 -----

Read rate (ASYNC): 38Kb in 0.05s => 0.00 Mb/sec

Longest record: 0Kb, moves: 0/99 (0%)

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

----- Recovery Hash Table Statistics ---------

Hash table buckets = 32768

Longest hash chain = 1

Average hash chain = 12/12 = 1.0

Max compares per lookup = 1

Avg compares per lookup = 183/195 = 0.9

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

*** 2013-09-24 10:27:53.045

KCRA: start recovery claims for 12 data blocks

*** 2013-09-24 10:27:53.047

KCRA: buffers claimed = 12/12, eliminated = 0

----- Recovery Hash Table Statistics ---------

Hash table buckets = 32768

Longest hash chain = 1

Average hash chain = 12/12 = 1.0

Max compares per lookup = 1

Avg compares per lookup = 195/195 = 1.0

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

ORA-01578: ORACLE data block corrupted (file # 1, block # 3243)

ORA-01110: data file 1: '/u01/oracle/oradata/NINVOICE/system01.dbf'

 

 

[oracle@jsmn bdump]$ dbv file= '/u01/oracle/oradata/NINVOICE/system01.dbf' blocksize=8192

 

DBVERIFY: Release 9.2.0.4.0 - Production on Tue Sep 24 10:31:12 2013

 

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

 

DBVERIFY - Verification starting : FILE = /u01/oracle/oradata/NINVOICE/system01.dbf

Page 3243 is influx - most likely media corrupt

***

Corrupt block relative dba: 0x00400cab (file 1, block 3243)

Fractured block found during dbv:

Data in bad block -

 type: 6 format: 2 rdba: 0x00400cab

 last change scn: 0x0000.008ced52 seq: 0x1 flg: 0x06

 consistency value in tail: 0x76ee0601

 check value in block header: 0x5584, computed block checksum: 0x9bbc

 spare1: 0x0, spare2: 0x0, spare3: 0x0

***

 

 

 

DBVERIFY - Verification complete

 

Total Pages Examined         : 48640

Total Pages Processed (Data) : 33143

Total Pages Failing   (Data) : 0

Total Pages Processed (Index): 4348

Total Pages Failing   (Index): 0

Total Pages Processed (Other): 1892

Total Pages Processed (Seg)  : 0

Total Pages Failing   (Seg)  : 0

Total Pages Empty            : 9256

Total Pages Marked Corrupt   : 1

Total Pages Influx           : 1

[oracle@jsmn bdump]$

 

[oracle@jsmn lib]$ make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed

 

Linking BBED utility (bbed)

rm -f /u01/oracle/product/9.2.0//rdbms/lib/bbed

gcc -o /u01/oracle/product/9.2.0//rdbms/lib/bbed -L/u01/oracle/product/9.2.0//rdbms/lib/ -L/u01/oracle/product/9.2.0//lib/ -L/u01/oracle/product/9.2.0//lib/stubs/  /u01/oracle/product/9.2.0//lib/s0main.o /u01/oracle/product/9.2.0//rdbms/lib/ssbbded.o /u01/oracle/product/9.2.0//rdbms/lib/sbbdpt.o `cat /u01/oracle/product/9.2.0//lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 /u01/oracle/product/9.2.0//rdbms/lib/defopt.o -ldbtools9 -lclntsh  `cat /u01/oracle/product/9.2.0//lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /u01/oracle/product/9.2.0//lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lclient9  -lvsn9 -lwtc9 -lcommon9 -lgeneric9 -lwtc9 -lmm -lnls9  -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `cat /u01/oracle/product/9.2.0//lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /u01/oracle/product/9.2.0//lib/ldflags`    -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lclient9  -lvsn9 -lwtc9 -lcommon9 -lgeneric9  -ltrace9 -lnls9  -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -lclient9  -lvsn9 -lwtc9 -lcommon9 -lgeneric9 -lnls9  -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9   `cat /u01/oracle/product/9.2.0//lib/sysliblist` -Wl,-rpath,/u01/oracle/product/9.2.0//lib:/lib:/usr/lib -lm    `cat /u01/oracle/product/9.2.0//lib/sysliblist` -ldl -lm 

[oracle@jsmn lib]$ ./bbed blocksize=8192 mode=edit

Password:

 

BBED: Release 2.0.0.0.0 - Limited Production on Tue Sep 24 11:31:30 2013

 

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

 

************* !!! For Oracle Internal Use only !!! ***************

 

BBED> show all

        FILE#           0

        BLOCK#          1

        OFFSET          0

        DBA             0x00000000 (0 0,1)

        FILENAME      

        BIFILE          bifile.bbd

        LISTFILE      

        BLOCKSIZE       8192

        MODE            Edit

        EDIT            Unrecoverable

        IBASE           Dec

        OBASE           Dec

        WIDTH           80

        COUNT           512

        LOGFILE         log.bbd

        SPOOL           No

 

BBED> set filename '/u01/oracle/oradata/NINVOICE/system01.dbf'

        FILENAME        /u01/oracle/oradata/NINVOICE/system01.dbf

 

BBED> show all

        FILE#           0

        BLOCK#          1

        OFFSET          0

        DBA             0x00000000 (0 0,1)

        FILENAME        /u01/oracle/oradata/NINVOICE/system01.dbf

        BIFILE          bifile.bbd

        LISTFILE      

        BLOCKSIZE       8192

        MODE            Edit

        EDIT            Unrecoverable

        IBASE           Dec

        OBASE           Dec

        WIDTH           80

        COUNT           512

        LOGFILE         log.bbd

        SPOOL           No

BBED> set block 3243

        BLOCK#          3243

 

BBED> map /v

 File: /u01/oracle/oradata/NINVOICE/system01.dbf (0)

 Block: 3243                                  Dba:0x00000000

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

 KTB Data Block (Table/Cluster)

 

 struct kcbh, 20 bytes                      @0      

    ub1 type_kcbh                           @0      

    ub1 frmt_kcbh                           @1      

    ub1 spare1_kcbh                         @2      

    ub1 spare2_kcbh                         @3      

    ub4 rdba_kcbh                           @4      

    ub4 bas_kcbh                            @8      

    ub2 wrp_kcbh                            @12     

    ub1 seq_kcbh                            @14     

    ub1 flg_kcbh                            @15     

    ub2 chkval_kcbh                         @16     

    ub2 spare3_kcbh                         @18     

 

 struct ktbbh, 72 bytes                     @20     

    ub1 ktbbhtyp                            @20     

    union ktbbhsid, 4 bytes                 @24     

    struct ktbbhcsc, 8 bytes                @28     

    b2 ktbbhict                             @36     

    ub1 ktbbhflg                            @38     

    ub1 ktbbhfsl                            @39     

    ub4 ktbbhfnx                            @40     

    struct ktbbhitl[2], 48 bytes            @44     

 

 struct kdbh, 14 bytes                      @92     

    ub1 kdbhflag                            @92     

    b1 kdbhntab                             @93     

    b2 kdbhnrow                             @94     

    sb2 kdbhfrre                            @96     

    sb2 kdbhfsbo                            @98     

    sb2 kdbhfseo                            @100    

    b2 kdbhavsp                             @102    

    b2 kdbhtosp                             @104    

 

 struct kdbt[7], 28 bytes                   @106    

    b2 kdbtoffs                             @106    

    b2 kdbtnrow                             @108    

 

 sb2 kdbr[94]                               @134    

 

 ub1 freespace[1147]                        @322    

 

 ub1 rowdata[6719]                          @1469   

 

 ub4 tailchk                                @8188   

BBED> verify

DBVERIFY - Verification starting

FILE = /u01/oracle/oradata/NINVOICE/system01.dbf

BLOCK = 3243

 

Block 3243 is corrupt

***

Corrupt block relative dba: 0x00400cab (file 0, block 3243)

Fractured block found during verification

Data in bad block -

 type: 6 format: 2 rdba: 0x00400cab

 last change scn: 0x0000.008ced52 seq: 0x1 flg: 0x06

 consistency value in tail: 0x008ced52

 check value in block header: 0x5309, computed block checksum: 0x0

 spare1: 0x0, spare2: 0x0, spare3: 0x0

***

 

 

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   : 1

Total Blocks Influx           : 2

 

 

BBED> p kcbh

struct kcbh, 20 bytes                       @0      

   ub1 type_kcbh                            @0        0x06

   ub1 frmt_kcbh                            @1        0x02

   ub1 spare1_kcbh                          @2        0x00

   ub1 spare2_kcbh                          @3        0x00

   ub4 rdba_kcbh                            @4        0x00400cab

   ub4 bas_kcbh                             @8        0x008ced52

   ub2 wrp_kcbh                             @12       0x0000

   ub1 seq_kcbh                             @14       0x01

   ub1 flg_kcbh                             @15       0x06 (KCBHFDLC, KCBHFCKV)

   ub2 chkval_kcbh                          @16       0x5309

   ub2 spare3_kcbh                          @18       0x0000

 

BBED> m /x 010652ed offset 8188

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

 File: /u01/oracle/oradata/NINVOICE/system01.dbf (0)

 Block: 3243             Offsets: 8188 to 8191           Dba:0x00000000

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

 010652ed

 

 <32 bytes per line>

 

BBED> p tailchk

ub4 tailchk                                 @8188     0xed520601

 

BBED> sum apply

Check value for File 0, Block 3243:

current = 0x5584, required = 0x5584

 

BBED> verify

DBVERIFY - Verification starting

FILE = /u01/oracle/oradata/NINVOICE/system01.dbf

BLOCK = 3243

 

 

DBVERIFY - Verification complete

 

Total Blocks Examined         : 1

Total Blocks Processed (Data) : 1

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

 

BBED> exit

 

[oracle@jsmn bdump]$ sqlplus /nolog

 

SQL*Plus: Release 9.2.0.4.0 - Production on Tue Sep 24 12:32:38 2013

 

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

 

SQL> conn / as sysdba

Connected to an idle instance.

SQL> startup mount;

ORACLE instance started.

 

Total System Global Area  236000356 bytes

Fixed Size                   451684 bytes

Variable Size             201326592 bytes

Database Buffers           33554432 bytes

Redo Buffers                 667648 bytes

Database mounted.

SQL> alter database open;

 

Database altered.

 

SQL> select open_mode from v$database;

 

OPEN_MODE

----------

READ WRITE

 

SQL>    

转载于:http://blog.itpub.net/16381228/viewspace-773312/

你可能感兴趣的:(BBED修复system01.dbf坏块过程)