tbdv

This chapter describes the tbdv utility and its usage.

Overview

tbdv is a utility that checks integrity of data files in a Tibero database. It can perform basic integrity checks on data files while the database is offline.

tbdv checks the following for each data block.

  • Is a block marked with the correct DBA?

  • Does the block checksum match?

  • Do the used and available spaces of a block add up to the total block size?

  • Do the row pieces of a block not overlap with other row pieces ?

If an integrity check discovers an error, it is assumed to be a media failure and a media recovery must be performed on the database.


Quick Start

tbdv is automatically installed and uninstalled along with Tibero.

The following shows how to execute tbdv at a command prompt.

$ tbdv [-s BLKSIZE] [-l CHECK_LENGTH] /path/to/datafile

To set the block size, use the -s option (default value: 8,192 bytes).

To check only the specified length ofa file from the beginning, use the CHECK_LENGTH option. If this option is not specified, the entire file is checked. To use a raw device, explicitly set the device size. If not set, an error occurs.

The following executes tbdv.

Executing tbdv

$ tbdv df1.dtf
==================================================================
= Database Verifier (DV) starts =
= =
= TmaxData Corporation Copyright (c) 2008-. All rights reserved. =
==================================================================
Verifying 'df1.dtf'...


Verifying complete.

Total blocks: 1152
Processed blocks: 1063
Empty blocks: 89
Corrupt blocks: 0


Usage Example

This section describes how tbdv checks integrity of data files.

If a block is marked with incorrect DBA, tbdv displays the following.

When a Block Is Marked with Incorrect DBA

$ tbdv df1.dtf
==================================================================
= Database Verifier (DV) starts                                  =
=                                                                =
= TmaxData Corporation Copyright (c) 2008-. All rights reserved. =
==================================================================
Verifying 'df1.dtf'...

block #2351 is misplaced.dba differs (expected=16779567, real=16779551) 

Verifying complete.

Total blocks: 2433
Processed blocks: 2343
Empty blocks: 90
Corrupt blocks: 1

If a fractured block is found in a data file, tbdv displays the following.

When a Fractured Block Is Found

$ tbdv df1.dtf
==================================================================
= Database Verifier (DV) starts                                  =
=                                                                =
= TmaxData Corporation Copyright (c) 2008-. All rights reserved. =
==================================================================
Verifying 'df1.dtf'...

block #2311 isn't consistent. 

Verifying complete.

Total blocks: 2433
Processed blocks: 2343
Empty blocks: 90
Corrupt blocks: 1

If available and used spaces for data blocks does not sum up to the total block size, tbdv displays the following.

When the Available and Used Spaces in a Block Sums up Incorrectly

$ tbdv df1.dtf
==================================================================
= Database Verifier (DV) starts                                  =
=                                                                =
= TmaxData Corporation Copyright (c) 2008-. All rights reserved. =
==================================================================
Verifying 'df1.dtf'...

block #2004 has incorrect freespace. 

Verifying complete.

Total blocks: 2433
Processed blocks: 2343
Empty blocks: 90
Corrupt blocks: 1

Last updated