Product Navigation

Repair DBF File To Fix Corruption Issues


DBF file represents dBASE database file. File gets corrupted due to virus attack, improper system shutdown, use of Old version of DBF application, failure of Hard-drive and many other reasons. In this article we will discuss about solutions to recover DBF file data.

what is DBF ?


DBF is dBASE database file. DBF files were originally introduced with dBase II. It is used to store data in tabular format. Current dbf file level is called Level 7. It has following features:

  • Provide support for data types appropriate for business use.
  • Simple structure.
  • Best Suited for fixed-field data.
  • Contain textual and numeric data.
  • Compatible with other "xBase" database programs such as DollyBase, FoxPro and many more.

Causes of Corruption


  • Virus Attack
  • Improper system shutdown
  • Use of corrupted database application
  • Failure of Hard-drive
  • Faulty network devices
  • Use of Old version of DBF application
  • Due to frequent system power failure or outage

Common Errors


  • "Filename DBF has become corrupted"
  • "Table name has become corrupted. the table will need to be repaired before using again"
  • "Table dBase not correct"
  • "ERROR [42S02] [Microsoft][ODBC Visual FoxPro Driver]File 'table.dbf' does not exist"
  • "Couldn't find database "X:\...\DATABASE.DBF". Do you want to replace its use with another database?"
  • "Error instantiating cursor objects. Could not find (table file name)". "(Error-2091)"
  • "Invalid database – please validate database"

Read about how to repair DBF file.

Solutions To Repair DBF File


Solution #

Troubleshooting "Error: "Couldn't find database "X:\...\database.dbf". Do you want to..." Opening Approach File"

Cause : Error is encountered when user is unable to locate one or more DBF file associated with particular view file(.APR). This happens because associated DBF file has been deleted , or moved or renamed, file format is changed or file is severely damaged.

Method 1 To Fix Corrupted DBF File :

Locate all .DBF files associated with .APR and copy them to original locations.

or

Copy all DBF files associated with .APR file to new location.

Method 2 :

  • Right click DBF file.
  • Under File Properties uncheck option "Read only".

Method 3 :

Open DBF files directly without opening its associated .APR

  • From File menu, choose "Open" option.
  • From "drop-down list "Files of type", choose option "dBASE IV (*.DBF)".
  • Go to the appropriate database file and click Open.

Solution #

Run Windows system file checker ( sfc/scannow) and repair DBF file

  • Click Start button.
  • Type "command" in the search box.

  • Select command prompt option from menu.
  • Type command "sfc /scannow" and press enter.

Solution # Repair Registry Entry to restore DBF file

  • click start button.
  • Type "command" in the search box.
  • Select command prompt option.
  • Type "regedit" and press enter.
  • Registry editor opens up select the Error 2091 related key user want to back up.
  • From File menu, choose Export option.
  • In "Save In list" , select the folder where you want to save the error related backup key.
  • In Export Range box, "Selected branch" option is selected.
  • Click save.
  • File is saved with .reg file extension.

Solution #

Run Disk Cleanup (cleanmgr) (Windows XP, Vista, 7, 8, and 10) to repair DBF file:

  • Click Start button.
  • Type command in search box.
  • Type command "cleanmgr" in command prompt.
  • Disk Cleanup calculate how much disk space is occupied.
  • Disk Cleanup dialog box will appear with check boxes user can select.
  • "Temporary Files" category occupy more disk space.
  • Check the check box for option next to "Temporary Files" category that user want to clean.
  • click Ok.

Solution # check hard-drive for fragmentation

Note : Defragmentation is process of locating non-contiguous portions of hard-drive and rearranging those fragments into fewer fragments

Use built-in tool in Windows to defragment files. Follow steps to repair DBF file:

  • Open the disk optimization tool by searching for "optimize" in the search box.

  • Select hard drive and click Analyze button.

  • Check the percentage of fragmented files in the displayed results.

  • To defragment hard-drive, click Optimize button.

Solution # Use anti-virus to conduct full- virus scan of your PC.

Solution # Re-install the database application from trusted source to rebuild dbf file.

Solution # Recover the data from up-to date DBF backup file.

Solution # Ensure Your PC Is Updated and Secure

Follow steps to repair DBF file :

  • Go to Start >> Settings >> Update & Security >> Windows Update.

  • Click Advance Options.
  • Choose form drop down option "Automatic" and also check option "Give me updates for other Microsoft products when I update Windows"

Conclusion


DBF is a standard storage format for structured data in commercial applications. File gets corrupted due many reasons. In this article we discussed about how to repair dbf file manually. But if above solutions fail then use a professional third party tool for recovery of database file.