Chapter 6. tbdv

Table of Contents

6.1. Overview
6.2. Quick Start
6.3. Usage Example

This chapter introduces the tbdv utility and describes how to use it.

6.1. Overview

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

tbdv check the following in each data block:

  • Whether the block is marked with the correct DBA.
  • Whether the checksum for the block matches.
  • Whether the available and used spaces of a block sums up to the total block size.
  • Whether the row pieces of a block do 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.

6.2. Quick Start

tbdv is automatically installed and uninstalled with Tibero

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

When executing tbdv from the command prompt, the block size can be specified as an option. The default block size is 8,192 bytes.

Use the CHECK_LENGTH option to check only the specified length of the file from the start of the file. Otherwise, the entire file is checked. The CHECK_LENGTH must be specified for a RAW device, or an error occurs.

The following example illustrates how to execute tbdv.

[Example 6.1] 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      

6.3. Usage Example

This section describes how tbdv finds integrity errors in a datafile and displays the block that violates integrity.

tbdv displays the following results if an error occurs in the block marked with a DBA.

[Example 6.2] 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 the datafile, tbdv outputs the inconsistent data block's information.

[Example 6.3] 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 the available and used spaces in a data block does not sum up to the total block size, tbdv outputs the following:

[Example 6.4] 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      

Note

tbdv treats a zeroed out block as unformatted. Even if a block with data is zeroed out because of a disk error, it is treated as unformatted (unallocated space in the datafile) and no error is generated.