Consultor Eletrônico



Kbase 13848: How to determine a block type with database repair (dbrpr)
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/13/2002
How to determine a block type with database repair (dbrpr)

How to Determine What Type of Block is Damaged with DBRPR

After running a database scan and determining that there are
bad blocks in the database, it is usually a common question to
find out what was contained in the blocks that are damaged.

There isn't any way to see the data contained in the blocks,
but what we can try to do is determine what TYPE of block
it was.

Here's how. In this example, we have the output from a scan
that shows three bad blocks.

Scanning proddb.db
>From dbkey 15986624 to dbkey 32

Can't find Blk 133283 (4265056)
Can't find Blk 133282 (4265024)
Can't find Blk 133281 (4264992)


Total Records: 1321716
Continues: 7783
# Dumped: 0

With this output, run the dbrpr utility again, and from the main
menu, choose option 4. Dump Block. It will prompt you for a dbkey.
At the prompt enter the number in parentheses. It will create a
file called <dbkey>.dmp. The contents of the file looks like this:

# BLOCK REPAIR UTILITIES
# DATABASE = proddb.db
# DBKEY = 4265056
# BLOCK NUM = 133283


>0000 6014 4100 037F 0100 0000 0000 4D00 0000
>0010 0A16 9900 9003 C100 0102 8202 5102 2203
>0020 B402 0111 0701 DD01 0000 0000 0000 0000
>0030 0000 0000 0000 0000 0000 0000 0000 0000
>0040 0000 0000 0000 0000 0000 0000 0000 0000
>0050 0000 0000 0000 0000 0000 0000 0000 0000
>0060 0000 0000 0000 0000 0000 0000 0000 0000
>0070 0000 0000 0000 0000 0000 0000 0000 0000
>0080 0000 0000 0000 0000 00CA 0000 3EE7 003B
>0090 E700 0400 2300 3301 4D02 4D31 0A31 3036
>00A0 3736 3230 3733 5502 3FCC 0000 00FD 00FD
>00B0 0000 0341 5343 026F 6800 0000 FD00 0000
>00C0 0000 3EE7 0004 001F 0034 0147 0931 3037
.
.
.

In this example, we have dumped out a good block in order to
explain what the bits mean. If you convert the dbkey listed
in the header 4265056 to hex it should be equal to the first
four bits of the output (6014 4100). When a block is reported
as damaged, it is because these two numbers do not match, so
in your output of a damaged block these will not agree. The
next bit listed here as 03, indicates the block type. The different
block types are:

Version 6:

01 - Master Block
02 - Index Block
03 - Data Block
04 - Free Block
05 - Index Dbkey List

Version 7:

01 - Master Block
02 - Index Block
03 - Data Block
04 - Free Block
05 - Index DBKey List
06 - Set of Sequence Generator Values
07 - Block Above Database High Water Mark

Version 8:

01 - Master Block
02 - Index Block
03 - Data Block
04 - Free Block
05 - Index DBKey List
06 - Set of Sequence Generator Values
07 - Block Above Database High Water Mark
08 - Database Parameter Block
09 - Area Block
10 - Object Directory Block
11 - Extent List Block
12 - Object Block
13 - Control Block
254 - Extent Header Block
255 - Reserved

Version 9: (Same as above)

If the value in this bit is anything else, then we won't be
able to tell what type of block it is.

Here is an example of a bad block, where it is not possible to
tell the block type:

# BLOCK REPAIR UTILITIES
# DATABASE = /home2/qad/proddb.db
# DBKEY = 4264992
# BLOCK NUM = 133281


>0000 FD03 8014 0F03 706A 6D00 023F C504 4D49
>0010 5343 0000 0000 0000 0003 5553 4402 801F
>0020 0003 008C C900 0341 5343 026F 6800 FD00
>0030 0000 0000 0000 0000 0000 0000 0000 0000
>0040 FDFD FDFD FD00 0000 0000 0000 0000 0869
>0050 6375 6E72 632E 7000 0341 5343 0000 00FD
>0060 00FA 0005 0000 0000 FF00 0023 0201 1104
>0070 3531 3030 0004 3135 3030 0000 0003 04F2
>0080 1407 5243 542D 554E 5000 0000 0000 0000
>0090 B9E7 000A 002C 003F 0063 0078 0088 0200
>00A0 970A 3130 3637 3632 3037 3355 023F C5FD
>00B0 0652 4354 2D54 5202 4D31 0000 0003 8016
>00C0 0F00 0245 4102 3FC5 0000 0000 0000 0000
.
.
.

In this example the block type is listed as 0F which
is a bogus entry. If the block is completely corrupted
you may see information like this, or the block may contain
call zeroes.

The purpose of doing this is to confirm if possible that
data is going to be lost. If the blocks are index blocks,
there is no data loss.

Progress Software Technical Support Note # 13848