# Database Debug Utility

Topics

:

Overview
Usage

Overview

The database utility program is a console-based program used to analyze and rebuild gxDatabase files. Both a 32-bit and 64-bit version is supplied.

Usage

To use the database debug utility enter the name of the program followed by the name of the database file:

    db_debug simple.gxd
    db_dbg64 simple.gxd

To open a file, perform a single operation, and exit the program enter the name of the program followed by the name of the file followed by the letter of the command you wish to perform:

    vb_debug simple.gxd d

If no command is giving after the file name the utility program will display a menu and give you a ">" prompt. At the prompt enter the single letter of the command you wish to perform:

    Analyzing file: simple.gxd
    Enter the letter of your selection at the prompt.

    (A, a)    - Analyze the database file header
    (D, d)    - Dump every database block
    (F, f)    - Find every database block in the file
    (H, h, ?) - Displays this menu
    (Q, q)    - Quit this program
    (r)       - Rebuild a damaged database file
    (R)       - Rebuild and update to current version/revision
    (S, s)    - Display database file statistics
    (W, s)    - Walk through every database block

Enter "A" to analyze the database file header. If this function reports any errors, rebuild this file by selecting the "R" option.

Enter "D" to dump the database blocks to the console.

Enter "F" to report how many database blocks were found in this file, including blocks marked deleted or removed.

Enter "H" to display this menu again, after the program processes your selection.

Enter "Q" to exit this program.

Enter "r" to rebuild this file. This function will create a new file and attempt to recover every database block that is not marked deleted or remove. NOTE: The rebuild function will not allow you to overwrite existing files. Each time this function is executed you need to name a new file to be created. To abort a rebuild, press the enter key without typing a file name.

Enter "R" to rebuild this file and update it to the current database library version and revision level.

Enter "S" to display detailed file information about this file. This information is used to analyze and troubleshoot database files.

    ----- Database file statistics -----

    ----- Static information -----
    File Name:         simple.gxd
    File Signature:    GXDBASE
    Revision Letter:   C
    Library Version:   4000
    File Header Size:  40
    Block Header Size: 28
    Static area size:  0
    Static file size:  100

    ----- Dynamic Information -----
    File Status:     Open Read/Only
    Free Space:      0
    End of File:     100
    Heap Start:      40
    Highest Block:   40
    Total Blocks:    1
    Deleted/Removed: 0/0 (0)

    ----- Lock Header Information -----
    File Lock Protect:     0
    File Read Lock Value:  0
    File Write Lock Value: 0

Enter "W" to find every block in the file and display its statistics.

    ----- Block Statistics -----
    Check Word   = 0x0000FEFE
    Length       = 60
    Status       = N
    Next Deleted = 0

    ----- Object Statistics -----
    Object Length  = 28

    ----- Record Lock Statistics -----
    Record Lock Protect:     0
    Record Read Lock Value:  0
    Record Write Lock Value: 0

End Of Document