contact contact

dbfsck utility

» Usage | Notes | Examples | See also
  The dbfsck utility allows checking of the volume integrity (in case problems are suspected) or to attempt to get a corrupted volume fixed sufficiently so a sequential dbexport could be performed to recover the data. It is not a magic repair tool. Using dbfsck for data recovery should be considered the last option.

The dbfsck utility is an "offline utility" that directly accesses the database server volume files and may only be used when the database server is not active. The dbfsck read-only mode may be used if the database server is in on-line backup mode.

Note: dbfsck should not be run on a database which was not shutdown cleanly. Transactions from the log volume have not been applied and dbfsck could report wrong positives.


usage: dbfsck [options]
 -d flags   - debug flags
 -c cfg     - configuration file name
 -b size    - Buffer cache size (MB)
 -v         - output volume overview and informational messages,
              output progress info every minute on stdout

write options:
 -w         - Enable write mode
 -a         - Automatically fix minor inconsistencies
 -y         - Answer yes to all questions

Please Note: Enabling write mode and answering 'yes' to non-trivial
questions may cause data loss and could even result in additional
data corruption.
Unless you know what you're doing, you should consider to recover
the database from a backup.
dbfsck by default operates in read-only mode to analyze the volume consistency. Depending on the amount of data this can take a considerable time. Any messages (except for -v progress messages) are output to stderr.

The options are:

The -help option displays a brief help text.

-c eloqdb.cfg
The -c option specifies the eloqdb configuration file. The eloqdb configuration file is used to locate the database volume files. If not specified the default eloqdb.cfg is used.

If the -v option is present progress messages are output (to stdout).

The -w option enables dbfsck write mode which allows to repair inconsistencies. By default dbfsck operates in read-only mode to analyze volume consistency. In write mode, any repair operation must be confirmed by the operator unless the option -a or -y is used.

The -a option enables dbfsck in write mode to perform safe repairs automatically without prompting the user.

The -y option enables dbfsck in write mode to perform any recovery operations without prompting.

-d flags
The -d option specifies debug flags and is normally not used.

-b size
The -b option may be used to specify the size of internal buffer cache (in MB). The default buffer cache used by dbfsck is 5 MB.


dbfsck should not be used if the database was not shutdown cleanly. In this case uncommitted transactions may be in the transaction log which are not applied to the data volume(s). Please run dblogreset to apply the transaction journal or start the eloqdb to apply the transaction journal.

Running dbfsck on a "unclean" volume could result in false positives (incomplete transactions that are in the transaction journal) or even damage data in write mode. Consequently, if dbfsck detects that the volumes have not been shutdown cleanly it will print a warning message and refuse to run in write mode.

dbfsck uses two passes, each verifying different aspects of the volume file:

  • PASS 1 - verifying block allocation integrity

    Iterates each node's meta information and makes global sanity checks

    • is the NodeBlockList consistent?
    • does every page referred by the NodeBlockList belong to this node? (node cross-link detection)
    • is every used page really marked "in use" in the volume?

  • PASS 2 - verifying node integrity

    Iterates each node's contents and checks its contents in detail, depending on the particular node type (FixRec, Btree, Pool).

dbfsck uses the following terminology:

  • Node : data container, similar to a file
  • NodeBlockList : contains references to all used pages in a node
  • NodeBlockListContent : synonym for "data page" (a page the block list refers to)

  • FixRec : fixed size records, used for data storage
    -> corruptions can be recovered by dbfsck, but usually data is lost
  • FixRec free-list : free record bookkeeping information
    -> can be safely recovered by dbfsck without data loss
  • FixRec meta information : contains data set properties
    -> information such as number of used records can be safely recovered by dbfsck without data loss

  • Btree : used for storing index information
    -> inconsistencies can typically not be fixed by dbfsck but requires a database reload (or re-creating the indexes)

  • Pool : used for Catalog information
  • PoolFreeList : List of free blocks in a pool
    -> inconsistencies can normally not be fixed by dbfsck

Note that the dbfsck utility allows to specify node IDs (node numbers) on the command line. If present, pass 2 does only process the specified nodes.

For HP-UX and Windows, the dbfsck64 utility provides a 64 bit version of dbfsck. Large database environment sizes (approximately above 400 GB) may require the 64 bit dbfsck version to overcome a 32 bit address space limitation. If the 32 bit dbfsck issues a memory allocation failure, the 64 bit dbfsck should be used.

When running dbfsck in write mode:

  • Please make sure to have a backup before running dbfsck in write mode.

  • Running dbfsck in write mode will break transactional consistency and as a consequence, any replicated slave servers need to be re-synchronized. Also, forward recovery cannot be used to recover the database unless a new backup is made.


$ dbfsck 2>&1|tee /tmp/dbfsck.log

ELOQUENCE DBFSCK (C) Copyright 2013 Marxmeier Software AG (B.08.20)
Running in On-Line Read-Only mode

PASS 1 - verifying block allocation integrity

PASS 2 - verifying node integrity

The following example uses -v progress messages, redirecting check results to a file.
$ dbfsck -v  2>/tmp/dbfsck.log

ID  Type Path
1   DATA /data/db/db01.vol
2   LOG  /data/db/db02.vol
3   DATA /data/db/db03.vol
4   DATA /data/db/db04.vol
5   DATA /data/db/db05.vol
6   DATA /data/db/db06.vol
7   DATA /data/db/db07.vol

ID  Type  Cur.Sz  Ext.Sz  Max.Sz    Free    Used
1   DATA  1024.0     1.0  1024.0     0.0  1024.0
2   LOG     63.5     1.0     0.0    63.4     0.1
3   DATA  1024.0     1.0  1024.0     0.0  1024.0
4   DATA  1024.0     1.0  1024.0     0.0  1024.0
5   DATA  1024.0     1.0  1024.0     0.0  1024.0
6   DATA  1024.0     1.0  1024.0    32.1   991.9
7   DATA   152.5     1.0  1024.0   148.9     3.6

Processed 0 of 649749 pages (0%)
Processed 116787 of 649749 pages (17%)
Processed 266858 of 649749 pages (41%)
Processed 369120 of 649749 pages (56%)
Processed 401120 of 649749 pages (61%)
Processed 433120 of 649749 pages (66%)
Processed 462120 of 649749 pages (71%)
Processed 493120 of 649749 pages (75%)
Processed 522120 of 649749 pages (80%)
Processed 552120 of 649749 pages (84%)
Processed 649749 of 649749 pages (100%)

$ cat /tmp/dbfsck.log

ELOQUENCE DBFSCK (C) Copyright 2013 Marxmeier Software AG (B.08.20)
Running in On-Line Read-Only mode

PASS 1 - verifying block allocation integrity

PASS 2 - verifying node integrity


See also

dbcfix utility

  Privacy | Webmaster | Terms of use | Impressum Revision:  2014-08-14  
  Copyright © 2012-2014 Marxmeier Software AG