Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to mark and repair bad blocks with BBED

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

How to BBED mark bad blocks and repair bad blocks, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

BBED (Oracle Block Browerand EDitor Tool), a tool used to view and modify data file data directly, is an internal tool of Oracle, which can directly modify the contents of Oracle data file blocks, which is useful in some extreme recovery scenarios. This tool is not supported by Oracle, so no executable file is generated by default, and you need to reconnect before using it.

one。 BBED introduction

BBED (Oracle Block Browerand EDitor Tool), a tool used to view and modify data file data directly, is an internal tool of Oracle, which can directly modify the contents of Oracle data file blocks, which is useful in some extreme recovery scenarios. This tool is not supported by Oracle, so no executable file is generated by default, and you need to reconnect before using it.

two。 Installation and use of BBED

2.1 BBED installation

Oracle8i's BBED can be found under $ORACLE_HOME/bin under the windows platform, but 9i does not seem to be released with the software, so there is no such tool in windows, but on Linux, it needs to be compiled.

2.1.1 generate bbed by connecting in 9i/10g:

Cd $ORACLE_HOME/rdbms/lib

Make-f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed

2.1.2 BBED library files are not provided by default in 11g, but can be compiled with 10g files. You need to copy the following files from 10g to the corresponding directory before executing the above connection command. Refer to the following steps:

(1) copy Oracle 10g file

Since 11g does not provide bbed compilation, the following files can be copied to 11g from 10g on the same platform:

Scp $ORACLE10g_HOME/rdbms/lib/*sbbd* oralce@REMOTE_IP:$ORACLE11g_HOME/rdbms/lib

Scp $ORACLE10g_HOME/rdbms/mesg/bbedus* oracle@REMOTE_IP:$ORACLE11g_HOME/rdbms/mesg/

(2) compile in 11g database

-- 11G host

Cd $ORACLE_HOME/rdbms/lib

Make-f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed

The following example is the operation of uploading from 10g to 11g database:

[oracle@rhel ~] $cp $ORACLE_HOME/rdbms/lib/*sbbd* oracle@192.168.56.12:/u01/app/oracle/product/11.2.0/db_1/rdbms/lib

Cp: target `oracle@192.168.56.12:/u01/app/oracle/product/11.2.0/db_1/rdbms/lib' is not a directory

[oracle@rhel ~] $scp $ORACLE_HOME/rdbms/lib/*sbbd* oracle@192.168.56.12:/u01/app/oracle/product/11.2.0/db_1/rdbms/lib

Oracle@192.168.56.12's password:

Sbbdpt.o 100% 1863 1.8KB/s 00:00

Ssbbded.o 100% 1191 1.2KB/s 00:00

[oracle@rhel ~] $scp $ORACLE_HOME/rdbms/rdbms/mesg/bbedus* oracle@192.168.56.12:/u01/app/oracle/product/11.2.0/db_1/rdbms/mesg

Oracle@192.168.56.12's password:

/ u01appActionoracleproductUniverse 10.2.0.1UniplictdbmsUniplicateRdbmsUniplicatemesgUniqqbbedusUnitedly.rdbms: No such file or directory

[oracle@rhel ~] $scp $ORACLE_HOME/rdbms/mesg/bbedus* oracle@192.168.56.12:/u01/app/oracle/product/11.2.0/db_1/rdbms/mesg

Oracle@192.168.56.12's password:

Bbedus.msb 100% 8704 8.5KB/s 00:00

Bbedus.msg 100% 10KB 10.0KB/s 00:00

[oracle@rhel ~] $

2.2 using BBED

BBED is a command used internally by Oracle, so Oracle does not provide technical support. For security, BBED sets password protection, and the default password is blockedit.

Bbed is usually used to write some configuration information into a parameter text, and specify the parameter file when calling bbed

(1) obtain the information of datafile first

SQL > select file# | |''| | name | |''| | bytes from v$datafile

FILE# | |''| | NAME | |''| | BYTES

1/ u01/app/oracle/oradata/DBdb/system01.dbf 2936012800

2 / u01/app/oracle/oradata/DBdb/sysaux01.dbf 723517440

3 / u01/app/oracle/oradata/DBdb/undotbs01.dbf 2710568960

4 / u01/app/oracle/oradata/DBdb/users01.dbf 3207331840

5 / u01/app/oracle/oradata/DBdb/example01.dbf 355205120

6 / u01/app/oracle/oradata/DBdb/tbs.dbf 12582912

7 / u01/app/oracle/oradata/DBdb/tbs_tmp.dbf 12582912

7 rows selected.

Notice the file id here. Our file id here is the same as the file id inside the oracle system. Of course, we can also specify this id ourselves. When we set file id in bbed, it is based on the settings in this parameter file. It's best to set it to the same, or you may get confused later.

-- create a parameter file

[oracle@wang ~] $pwd

/ home/oracle

[oracle@wang ~] $cat bbed.par

Blocksize=8192

Listfile=/home/oracle/filelist.txt

Mode=edit

-- Save the datafile information queried above into the text

[oracle@wang ~] $cat filelist.txt

6 / u01/app/oracle/oradata/DBdb/tbs.dbf 12582912

7 / u01/app/oracle/oradata/DBdb/tbs_tmp.dbf 12582912

[oracle@wang ~] $

-- use parameter file to connect to bbed

[oracle@wang lib] $pwd

/ u01/app/oracle/product/11.2.0/db_1/rdbms/lib

[oracle@wang lib] $bbed parfile=/home/oracle/bbed.par

Password:

BBED: Release 2.0.0.0.0-Limited Production on Thu Feb 1 11:24:38 2018

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

*! For Oracle Internal Use only!! *

BBED > show

FILE# 6

BLOCK# 1

OFFSET 0

DBA 0x01800001 (25165825 6)

FILENAME / u01/app/oracle/oradata/DBdb/tbs.dbf

BIFILE bifile.bbd

LISTFILE / home/oracle/filelist.txt

BLOCKSIZE 8192

MODE Edit

EDIT Unrecoverable

IBASE Dec

OBASE Dec

WIDTH 80

COUNT 512

LOGFILE log.bbd

SPOOL No

BBED >

three。 BBED command description

Let's take a look at the instructions for the help:

BBED > help all

SET DBA [dba | file#, block#]

SET FILENAME 'filename'

SET FILE file#

SET BLOCK [+ / -] block#

SET OFFSET [[+ / -] byte offset | symbol | * symbol]

SET BLOCKSIZE bytes

SET LIST [FILE] 'filename'

SET WIDTH character_count

SET COUNT bytes_to_display

SET IBASE [HEX | OCT | DEC]

SET OBASE [HEX | OCT | DEC]

SET MODE [BROWSE | EDIT]

SET SPOOL [Y | N]

SHOW [| ALL]

INFO

Map [/ v] [DBA | FILENAME | FILE | BLOCK]

DUMP [/ v] [DBA | FILENAME | FILE | BLOCK | OFFSET | COUNT]

Print [/ x | d | u | o | c] [DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | * symbol]

EXAMINE [/ Nuf] [DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | * symbol]

:

N-a number which specifies a repeat count.

U-a letter which specifies a unit size:

B-b1, ub1 (byte)

H-b2, ub2 (half-word)

W-b4, ub4 (word)

R-Oracle table/index row

F-a letter which specifies a display format:

X-hexadecimal

D-decimal

U-unsigned decimal

O-octal

C-character (native)

N-Oracle number

T-Oracle date

I-Oracle rowid

Find [/ x | d | u | o | c] numeric/character string [TOP | CURR]

COPY [DBA | FILE | FILENAME | BLOCK] TO [DBA | FILE | FILENAME | BLOCK]

Modem [/ x | d | u | o | c] numeric/character string

[DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | * symbol]

ASSIGN [/ x | d | u | o] =

: [DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | * symbol]

: [value |]

SUM [DBA | FILE | FILENAME | BLOCK] [APPLY]

PUSH [DBA | FILE | FILENAME | BLOCK | OFFSET]

POP [ALL]

REVERT [DBA | FILE | FILENAME | BLOCK]

UNDO

HELP [| ALL]

VERIFY [DBA | FILE | FILENAME | BLOCK]

CORRUPT [DBA | FILE | FILENAME | BLOCK]

BBED >

BBED > help map

Map [/ v] [DBA | FILENAME | FILE | BLOCK]

BBED > help verify

VERIFY [DBA | FILE | FILENAME | BLOCK]

Here are a few common ones:

Set sets the current environment

Show looks at the current environment parameters, similar to sqlplus's command of the same name.

Dump lists the contents of the specified block

Find looks for the specified string in the specified block. The result is that the string and its offset, offset, are displayed. The offset is the number of bytes in the block.

Modify modifies the value of the specified offset of the specified block, which can be modified online.

Copy copy the contents of one block to another block

Verify checks whether there are bad blocks in the current environment

After sum calculates the checksum,modify of block, block is identified as a bad block, current checksum is inconsistent with reqired checksum, and the sum command can calculate a new checksum and apply it to the current block.

Undo rolls back the current modification operation. If you make a mistake, undo will ok and return to the original state.

Revert rolls back all previous modifications, which means undo all

4. Experimental BBED marks bad blocks and repairs them, as follows:

1. Create table abc and tablespace abc

SQL > select file_id,tablespace_name,file_name,status from dba_data_files

FILE_ID TABLESPACE_NAME FILE_NAME STATUS

--

4 USERS / u01/app/oracle/oradata/DBdb/users01.dbf AVAILABLE

3 UNDOTBS1 / u01/app/oracle/oradata/DBdb/undotbs01.dbf AVAILABLE

2 SYSAUX / u01/app/oracle/oradata/DBdb/sysaux01.dbf AVAILABLE

1 SYSTEM / u01/app/oracle/oradata/DBdb/system01.dbf AVAILABLE

5 EXAMPLE / u01/app/oracle/oradata/DBdb/example01.dbf AVAILABLE

6 TBS / u01/app/oracle/oradata/DBdb/tbs.dbf AVAILABLE

7 TBS_TMP / u01/app/oracle/oradata/DBdb/tbs_tmp.dbf AVAILABLE

8 TEST / u01/app/oracle/oradata/DBdb/test01.dbf AVAILABLE

8 rows selected.

SQL >

SQL > create tablespace abc datafile'/ u01qapplash oracle.oradata size abc01.dbf' oradata

Tablespace created.

SQL > conn scott/tiger

Connected.

SQL >

SQL > create table scott.abc tablespace abc as select * from user_tables

Table created.

SQL >

SQL > SELECT rowid,s.TABLE_NAME,s.TABLESPACE_NAME,s.STATUS FROM scott.abc s where rownum

-- query file#,rel_fno,blockno and other information according to rowid

Select rowid

Dbms_rowid.rowid_to_absolute_fno ('AAAV80AAJAAAACDAAA','SCOTT','ABC') file#

Dbms_rowid.rowid_object ('AAAV80AAJAAAACDAAA') objid

Dbms_rowid.rowid_relative_fno ('AAAV80AAJAAAACDAAA') rel_fno

Dbms_rowid.rowid_block_number ('AAAV80AAJAAAACDAAA') blockno

Dbms_rowid.rowid_row_number ('AAAV80AAJAAAACDAAA') rownumb

From dual

SQL > select rowid

2 dbms_rowid.rowid_to_absolute_fno ('AAAV80AAJAAAACDAAA','SCOTT','ABC') file#

3 dbms_rowid.rowid_object ('AAAV80AAJAAAACDAAA') objid

4 dbms_rowid.rowid_relative_fno ('AAAV80AAJAAAACDAAA') rel_fno

5 dbms_rowid.rowid_block_number ('AAAV80AAJAAAACDAAA') blockno

6 dbms_rowid.rowid_row_number ('AAAV80AAJAAAACDAAA') rownumb

7 from dual

ROWID FILE# OBJID REL_FNO BLOCKNO ROWNUMB

--

AAAAB0AABAAAAOhAAA 9 89908 9 131 0

-- query table information according to file#,blockno and other information

SELECT owner, segment_name,segment_type,relative_fno,tablespace_name

FROM dba_extents

WHERE file_id = & AFN

And & BL between block_id AND block_id + blocks-1

SQL > conn / as sydba

Connected.

SQL > SELECT owner, segment_name,segment_type,relative_fno,tablespace_name

2 FROM dba_extents

3 WHERE file_id = & AFN

4 and & BL between block_id AND block_id + blocks-1

Enter value for afn: 9

Old 3: WHERE file_id = & AFN

New 3: WHERE file_id = 9

Enter value for bl: 131

Old 4: and & BL between block_id AND block_id + blocks-1

New 4: and 131between block_id AND block_id + blocks-1

OWNER SEGMENT_NAME SEGMENT_TYPE RELATIVE_FNO TABLESPACE_NAME

--

SCOTT ABC TABLE 9 ABC

SQL >

SQL > SELECT owner,tablespace_name,extent_id,file_id,block_id,bytes,blocks FROM dba_extents WHERE segment_name='ABC'

OWNER TABLESPACE_NAME EXTENT_ID FILE_ID BLOCK_ID BYTES BLOCKS

SCOTT ABC 0 9 128 65536 8

two。 Modify a block to become a bad block using bbed

The simulation finds the block number to destroy:

Select dbms_rowid.rowid_object (rowid) obj#

Dbms_rowid.rowid_to_absolute_fno (rowid, 'SCOTT',' ABC') file#

Dbms_rowid.rowid_relative_fno (rowid) rfile#

Dbms_rowid.rowid_block_number (rowid) block#

Dbms_rowid.rowid_row_number (rowid) row#

From scott.abc

Where rownum = 1

SQL > select dbms_rowid.rowid_object (rowid) obj#

2 dbms_rowid.rowid_to_absolute_fno (rowid, 'SCOTT',' ABC') file#

3 dbms_rowid.rowid_relative_fno (rowid) rfile#

4 dbms_rowid.rowid_block_number (rowid) block#

5 dbms_rowid.rowid_row_number (rowid) row#

6 from scott.abc

7 where rownum = 1

OBJ# FILE# RFILE# BLOCK# ROW#

--

89908 99 131 0

2.1 query information:

SQL > select file# | |''| | name | |''| | bytes from v$datafile

FILE# | |''| | NAME | |''| | BYTES

1/ u01/app/oracle/oradata/DBdb/system01.dbf 2936012800

2 / u01/app/oracle/oradata/DBdb/sysaux01.dbf 723517440

3 / u01/app/oracle/oradata/DBdb/undotbs01.dbf 2710568960

4 / u01/app/oracle/oradata/DBdb/users01.dbf 3207331840

5 / u01/app/oracle/oradata/DBdb/example01.dbf 355205120

6 / u01/app/oracle/oradata/DBdb/tbs.dbf 12582912

7 / u01/app/oracle/oradata/DBdb/tbs_tmp.dbf 12582912

8 / u01/app/oracle/oradata/DBdb/test01.dbf 31457280

9 / u01/app/oracle/oradata/DBdb/abc01.dbf 52428800

9 rows selected.

SQL >

2.2 add information about abc tablespaces to the filelist file:

[oracle@wang ~] $cat filelist.txt

9 / u01/app/oracle/oradata/DBdb/abc01.dbf 52428800

[oracle@wang ~] $

2.3 Edit the parfile file for bbed:

[oracle@wang ~] $cat bbed.par

Blocksize=8192

Listfile=/home/oracle/filelist.txt

Mode=edit

[oracle@wang ~] $

2.4 enter bbed:

[oracle@wang lib] $bbed parfile=/home/oracle/bbed.par

Password:

BBED: Release 2.0.0.0.0-Limited Production on Thu Feb 1 15:24:01 2018

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

*! For Oracle Internal Use only!! *

BBED > show

FILE# 9

BLOCK# 1

OFFSET 0

DBA 0x02400001 (37748737 9. 1)

FILENAME / u01/app/oracle/oradata/DBdb/abc01.dbf

BIFILE bifile.bbd

LISTFILE / home/oracle/filelist.txt

BLOCKSIZE 8192

MODE Edit

EDIT Unrecoverable

IBASE Dec

OBASE Dec

WIDTH 80

COUNT 512

LOGFILE log.bbd

SPOOL No

BBED >

BBED > set file 9 block 131

FILE# 9

BLOCK# 131

BBED > map

File: / u01/app/oracle/oradata/DBdb/abc01.dbf (9)

Block: 131 Dba:0x02400083

KTB Data Block (Table/Cluster)

Struct kcbh, 20 bytes @ 0

Struct ktbbh, 96 bytes @ 20

Struct kdbh, 14 bytes @ 124

Struct kdbt [1], 4 bytes @ 138

Sb2 kdbr [5] @ 142

Ub1 freespace [6899] @ 152

Ub1 rowdata [1137] @ 7051

Ub4 tailchk @ 8188

BBED >

BBED > p kcbh

Struct kcbh, 20 bytes @ 0

Ub1 type_kcbh @ 0 0x06

Ub1 frmt_kcbh @ 1 0xa2

Ub1 spare1_kcbh @ 2 0x00

Ub1 spare2_kcbh @ 3 0x00

Ub4 rdba_kcbh @ 4 0x02400083

Ub4 bas_kcbh @ 8 0x003a7f7b

Ub2 wrp_kcbh @ 12 0x0000

Ub1 seq_kcbh @ 14 0x02

Ub1 flg_kcbh @ 15 0x04 (KCBHFCKV)

Ub2 chkval_kcbh @ 16 0xb3d6

Ub2 spare3_kcbh @ 18 0x0000

BBED >

-- modify it as follows:

BBED > modify / x ff offset 14

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

File: / u01/app/oracle/oradata/DBdb/abc01.dbf (9)

Block: 131 Offsets: 14 to 525 Dba:0x02400083

Ff04d6b3 00000100 0000345f 0100797f 3a000000 00000300 32008000 4002ffff

00000000 00000000 00000000 00000080 0000797f 3a000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000 00000001 0500ffff 1c000f1b f31af31a 00000500

981eaf1d dc1cf41b 0f1b0000 00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

-- query again:

BBED > p kcbh

Struct kcbh, 20 bytes @ 0

Ub1 type_kcbh @ 0 0x06

Ub1 frmt_kcbh @ 1 0xa2

Ub1 spare1_kcbh @ 2 0x00

Ub1 spare2_kcbh @ 3 0x00

Ub4 rdba_kcbh @ 4 0x02400083

Ub4 bas_kcbh @ 8 0x003a7f7b

Ub2 wrp_kcbh @ 12 0x0000

Ub1 seq_kcbh @ 14 0xff

Ub1 flg_kcbh @ 15 0x04 (KCBHFCKV)

Ub2 chkval_kcbh @ 16 0xb3d6

Ub2 spare3_kcbh @ 18 0x0000

BBED >

-- apply and confirm the modification:

BBED > sum apply

Check value for File 9, Block 131:

Current = 0xb32b, required = 0xb32b

2.5 check with dbv tool and find bad blocks: (file 9, block 131)

[oracle@wang ~] $dbv file=/u01/app/oracle/oradata/DBdb/abc01.dbf

DBVERIFY: Release 11.2.0.4.0-Production on Thu Feb 1 15:36:47 2018

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

DBVERIFY-Verification starting: FILE = / u01/app/oracle/oradata/DBdb/abc01.dbf

Page 131is influx-most likely media corrupt

Corrupt block relative dba: 0x02400083 (file 9, block 131)

Fractured block found during dbv:

Data in bad block:

Type: 6 format: 2 rdba: 0x02400083

Last change scn: 0x0000.003a7f7b seq: 0xff flg: 0x04

Spare1: 0x0 spare2: 0x0 spare3: 0x0

Consistency value in tail: 0x7f7b0602

Check value in block header: 0xb32b

Computed block checksum: 0x0

DBVERIFY-Verification complete

Total Pages Examined: 6400

Total Pages Processed (Data): 1242

Total Pages Failing (Data): 0

Total Pages Processed (Index): 0

Total Pages Failing (Index): 0

Total Pages Processed (Other): 155

Total Pages Processed (Seg): 0

Total Pages Failing (Seg): 0

Total Pages Empty: 5002

Total Pages Marked Corrupt: 1

Total Pages Influx: 1

Total Pages Encrypted: 0

Highest block SCN: 3833726 (0.3833726)

[oracle@wang ~] $

3. Use bbed to repair the block:

When an ora-01578 error occurs, oracle sets the sequence number of the block to 0xff and the position in the block to kcbh.seq_kcbh.

[oracle@wang lib] $bbed parfile=/home/oracle/bbed.par

Password:

BBED: Release 2.0.0.0.0-Limited Production on Thu Feb 1 15:39:24 2018

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

*! For Oracle Internal Use only!! *

BBED > show

FILE# 9

BLOCK# 1

OFFSET 0

DBA 0x02400001 (37748737 9. 1)

FILENAME / u01/app/oracle/oradata/DBdb/abc01.dbf

BIFILE bifile.bbd

LISTFILE / home/oracle/filelist.txt

BLOCKSIZE 8192

MODE Edit

EDIT Unrecoverable

IBASE Dec

OBASE Dec

WIDTH 80

COUNT 512

LOGFILE log.bbd

SPOOL No

BBED > help verify

VERIFY [DBA | FILE | FILENAME | BLOCK]

-- switch to file 9 block 131and check to find bad blocks, as follows:

BBED > set file 9 block 131

FILE# 9

BLOCK# 131

BBED > show

FILE# 9

BLOCK# 131

OFFSET 0

DBA 0x02400083 (37748867 9131)

FILENAME / u01/app/oracle/oradata/DBdb/abc01.dbf

BIFILE bifile.bbd

LISTFILE / home/oracle/filelist.txt

BLOCKSIZE 8192

MODE Edit

EDIT Unrecoverable

IBASE Dec

OBASE Dec

WIDTH 80

COUNT 512

LOGFILE log.bbd

SPOOL No

BBED > verify

DBVERIFY-Verification starting

FILE = / u01/app/oracle/oradata/DBdb/abc01.dbf

BLOCK = 131,

Block 131 is corrupt

Corrupt block relative dba: 0x02400083 (file 0, block 131)

Fractured block found during verification

Data in bad block:

Type: 6 format: 2 rdba: 0x02400083

Last change scn: 0x0000.003a7f7b seq: 0xff flg: 0x04

Spare1: 0x0 spare2: 0x0 spare3: 0x0

Consistency value in tail: 0x7f7b0602

Check value in block header: 0xb32b

Computed block checksum: 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

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

-- start the repair:

BBED > map

File: / u01/app/oracle/oradata/DBdb/abc01.dbf (9)

Block: 131 Dba:0x02400083

KTB Data Block (Table/Cluster)

Struct kcbh, 20 bytes @ 0

Struct ktbbh, 96 bytes @ 20

Struct kdbh, 14 bytes @ 124

Struct kdbt [1], 4 bytes @ 138

Sb2 kdbr [5] @ 142

Ub1 freespace [6899] @ 152

Ub1 rowdata [1137] @ 7051

Ub4 tailchk @ 8188

BBED > p kcbh

Struct kcbh, 20 bytes @ 0

Ub1 type_kcbh @ 0 0x06

Ub1 frmt_kcbh @ 1 0xa2

Ub1 spare1_kcbh @ 2 0x00

Ub1 spare2_kcbh @ 3 0x00

Ub4 rdba_kcbh @ 4 0x02400083

Ub4 bas_kcbh @ 8 0x003a7f7b

Ub2 wrp_kcbh @ 12 0x0000

Ub1 seq_kcbh @ 14 0xff

Ub1 flg_kcbh @ 15 0x04 (KCBHFCKV)

Ub2 chkval_kcbh @ 16 0xb32b

Ub2 spare3_kcbh @ 18 0x0000

-- the tailchk information here is correct and does not need to be modified, as follows:

BBED > p tailchk

Ub4 tailchk @ 8188 0x7f7b0602

-- modified to the original 02

BBED > modify / x 02 offset 14

File: / u01/app/oracle/oradata/DBdb/abc01.dbf (9)

Block: 131 Offsets: 14 to 525 Dba:0x02400083

0204d5b3 00000100 0000345f 0100797f 3a000000 00000300 32008000 4002ffff

00000000 00000000 00000000 00000080 0000797f 3a000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000 00000001 0500ffff 1c000f1b f31af31a 00000500

981eaf1d dc1cf41b 0f1b0000 00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

-- Verification

BBED > p kcbh

Struct kcbh, 20 bytes @ 0

Ub1 type_kcbh @ 0 0x06

Ub1 frmt_kcbh @ 1 0xa2

Ub1 spare1_kcbh @ 2 0x00

Ub1 spare2_kcbh @ 3 0x00

Ub4 rdba_kcbh @ 4 0x02400083

Ub4 bas_kcbh @ 8 0x003a7f7b

Ub2 wrp_kcbh @ 12 0x0000

Ub1 seq_kcbh @ 14 0x02

Ub1 flg_kcbh @ 15 0x04 (KCBHFCKV)

Ub2 chkval_kcbh @ 16 0xb3d5

Ub2 spare3_kcbh @ 18 0x0000

-- Application

BBED > sum apply

Check value for File 9, Block 131:

Current = 0xb3d6, required = 0xb3d6

-- detected again and found that the bad blocks disappeared.

BBED > verify

DBVERIFY-Verification starting

FILE = / u01/app/oracle/oradata/DBdb/abc01.dbf

BLOCK = 131,

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

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

BBED >

4. No bad blocks were found using the dbv tool.

[oracle@wang ~] $dbv file=/u01/app/oracle/oradata/DBdb/abc01.dbf

DBVERIFY: Release 11.2.0.4.0-Production on Thu Feb 1 15:56:44 2018

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

DBVERIFY-Verification starting: FILE = / u01/app/oracle/oradata/DBdb/abc01.dbf

DBVERIFY-Verification complete

Total Pages Examined: 6400

Total Pages Processed (Data): 1243

Total Pages Failing (Data): 0

Total Pages Processed (Index): 0

Total Pages Failing (Index): 0

Total Pages Processed (Other): 155

Total Pages Processed (Seg): 0

Total Pages Failing (Seg): 0

Total Pages Empty: 5002

Total Pages Marked Corrupt: 0

Total Pages Influx: 0

Total Pages Encrypted: 0

Highest block SCN: 3833726 (0.3833726)

[oracle@wang ~] $

[oracle@wang ~] $

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report