IBM Support

About the ClearCase database utility dbcheck

Question & Answer


Question

What is the IBM® Rational® ClearCase® dbcheck utility, where it is located and how does it work?

Cause


The dbcheck utility is unreferenced in the ClearCase documentation family.

Attempts to find a man page for instructions on the dbcheck utility will yield the following error:


Microsoft® Windows®:

>cleartool man dbcheck
cleartool: Error: Unable to find help file: "C:\Program
Files\Rational\ClearCase\doc/help/cc_ref/dbcheck.htm".

UNIX® and Linux®

>cleartool man dbcheck
No manual entry for dbcheck.

This is by design as the dbcheck utility is an undocumented command.

Answer

The dbcheck utility is a Raima level database utility located in the etc > utils directory of your ClearCase installation path. This tool checks the integrity of the files in the database directory of your VOB storage - specifically the vob_db.d0* and vob_db.k0* files.

The dbcheck utility is not aware of ClearCase at all. It can be run on a machine that doesn't have ClearCase installed, as long as the 7 Raima database files (and the vob_db.dbd file) are copied to it. The dbcheck tool reads only those 7 files looking for inconsistencies between the key files (vob_db.k0*) and the data files (vob_db.d0*), and no more. It doesn't care about branches, versions, elements, triggers, permissions, etc... It only cares about whether or not each individual database record looks healthy.

The dbcheck tool will report false error conditions if the database is changing underneath it. For example, if a checkin occurs during run time of the dbcheck tool, there may be an indication of that checkin in the .d01 file but not in the .k01 file - and dbcheck reports a problem. This only happens if any database files are being modified during the dbcheck run. If the VOB is locked for all users that means no write operations can occur in the VOB (other than unlocking it). This ensures that the database won't change, and thus that the dbcheck run is valid. If the VOB is unlocked during the dbcheck, or the VOB is not locked for a specific user who modifies the database, the dbcheck is invalid.

Read operations on the database can still occur when the VOB is locked. Constructing cleartext is a read operation from a database point of view - the cleartext container may be written but dbcheck never looks outside the db directory - as long as those 7 files never change dbcheck is fine.



In order to see usage statement and a definition of the syntax type dbcheck with no options from the command line.

EXAMPLE:

>dbcheck

db_VISTA Version 3.20
Database Consistency Check Utility
Copyright (C) 1985-1990 Raima Corporation, All Rights Reserved
usage:   dbcheck [-options] dbname [dbfile(s)]
options: [-s] [-k] [-dk] [-kd] [-a] [-ts] [-r#] [-p#] [-f#] [-t] [-c]

  -s  = Perform complete set consistency check
  -k  = Perform key file structure consistency check
  -dk = Perform key access consistency check from data files
  -kd = Perform key data consistency check from key files
  -ts = Perform time stamp checks for records and sets
  -a  = Does -s -dk -kd -ts
  -r# = Report every # percent to stderr
  -p# = Number of pages for vista to allocate to its page cache
  -f# = Number of open files vista is allowed to have
  -t  = Print a traceback of the b-tree at the first sign of disorder
  -c  = Print counts of objects scanned in the check


Please review technote 1122748 for information on how to run the dbcheck utility on Windows®, UNIX® or Linux®.

Note: The dbcheck utility has not been shipped with ClearCase for the Solaris 10 on x86 (sol_x86) platform.

Also review technote 1207935 on how to run the dbcheck utility on a read-only filesystem.

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Utilities and Tools","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"2003.06.00;7.0;7.0.1;7.1;7.1.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Utilities and Tools","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21203130