How to Repair Microsoft Access Database File and Recover Data

Summary: Is your Access database corrupt? Need to know how to repair a corrupt Access database? Read this post to explore the methods to repair a corrupt Access database. Also, check out step-wise instructions to recover data from the corrupted db. You may try Stellar Repair for Access software to repair your database and recover its objects without downtime. Download the software free demo version to verify recoverable Access database objects.


How to Repair Microsoft Access Database File and Recover Data

Corruption in MS Access database usually occurs when errors are found in the underlying binary file format of the database. When that happens, you may face random errors or difficulty in accessing Access database files (.MDB/.ACCDB files).

Other Reasons behind Access Database Corruption

  • Frequently Editing Data in Memo Fields

Frequent editing of data in Memo fields increases the chances of Access database corruption. It mostly results from a problem with a VBA module and does not pose a risk of data loss. However, it does pose a risk of database design damage.

  • Interruption when Changing Data

Interruption when making changes to data may cause corruption in the Access database file. You can repair the Access database file, but some data may be missing after the repair is complete.

  • Virus Infection

If a virus infects a file needed by the Access database and once that file is used when the database opens, the infection will spread to the database and corrupts it.

  • Hardware Failure

Hardware failure such as lost packets on network cards and bad sectors on hard drives can cause Microsoft Access application to crash, which may also lead to data loss.

  • Improperly Designed Plug-ins

Installing third-party plug-ins in Access can also corrupt the db, if they are not properly designed. Essentially, plug-ins run in the same memory space as Microsoft Access does. And so, a plug-in crash can also cause the application to crash, leading to database corruption.

  • Jet Database Engine Version Conflicts

If multiple users of the same database have different Jet service packs and updates installed, minor differences in the MDB file format and file-locking mechanisms can cause database corruption.

  • Software Bugs

A few bugs in Access and Jet software are, sometimes, responsible for corruption.

  • Abrupt System Shutdown

Though it happens very rarely, improper shutdown of the system while some activity is being performed on the database can lead to its corruption.

Also read: Top 10 Access Database Corruption Causes

Tip: Troubleshooting corruption in the MS Access database manually may take significant time, increasing the risk of data loss. Use Stellar Repair for MS Access software to quickly repair corrupt Access database and recover all its objects, like tables, queries, forms, reports, and other objects. Download the free trial version of the software to validate the accuracy of recoverable data.

How to Repair Microsoft Access Database?

Tip! Check out this article on MDB repair for information about repairing MS Access 2003 or a lower version database.

You can either try repairing the database manually or by using DIY (do-it-yourself) software.

Use ‘Compact and Repair’ to Repair Access Database Manually

You can use the Microsoft Access built-in ‘Compact and Repair’ feature for repairing a corrupt .MDB/.ACCDB database file.

Steps to Compact and Repair the Database that is Open

If an Access database turns corrupt when the database is still open and you haven’t saved any changes made to the database, follow these steps to compact and repair your database:

Step 1: In your Access database, click ‘File’.

Step 2: From the window that appears, click the ‘Compact & Repair’ option on the ‘Info’ page.

Compact and Repair an Access Database

Figure 1 – Compact and Repair an Access Database

Access will create a copy of the compacted and repaired database at the same location as that of the original database.

Steps to Compact and Repair the Database that cannot be Opened

If you cannot access your corrupt database, execute the following steps to compact and repair the database:

Note: Before performing the below steps, make sure that the database file is no longer in use by any other user.

Step 1: Open your MS Access program.

Step 2: For Access 2013, 2016, and 2019, do the following:

  • From ‘templates’ screen, double-click to open a ‘Blank desktop database’.
Open a Blank desktop database

Figure 2 – Open a Blank desktop database

  • In your MS Access program, click the ‘File’ menu. Next, click ‘Close’ to exit the database.
Close the Access Database

Figure 3 – Close the Access Database

Step 3: Click Database Tools > Compact & Repair Database.

Select Compact and Repair Database

Figure 4 – Select Compact and Repair Database

Step 4: In the ‘Database to Compact From’ dialog box, locate the corrupt Access database file and double-click on it.

Double-click the Access Database

Figure 5 – Double-click the Access Database

Step 5: When the ‘Compact Database Into’ window opens, specify a new name to the compacted and repaired database, and then click ‘Save’.

Save the Compacted and Repaired Database

Figure 6 – Save the Compacted and Repaired Database

After performing these steps, a copy of the compacted and repaired database (i.e. Database 1) will be created at the same location as that of the original database (i.e. Test_db).

Compacted and Repaired Database Copy

Figure 7 – Compacted and Repaired Database Copy

If Compact and Repair does not work for you, use a professional Access database repair tool to fix database corruption. You can try to recover your Access database manually by following the steps discussed in the next section. 

Use Stellar Repair for Access Software

Stellar Repair for Access is a powerful DIY software that you can use to repair and recover .MDB/.ACCDB file in a few simple steps. 

Free Download

Follow these steps to perform Access database repair by using the software:

Step 1: Download, install and run Stellar Repair for Access software.

Step 2: In the window that pops-up, ‘Browse’and select the corrupt file.

Notes:

  • You can also search the corrupted MDB or ACCDB files from the appropriate drive by selecting the drive and click on the ‘Search’ button.
  • Check the “Scan for deleted records” checkbox to include the deleted records for recovery.
Browse or Search Corrupt Access Database File

Figure 8 – Browse or Search Corrupt Access Database File

Step 3: Click ‘Repair’ to start the repairing process.

Repair Corrupt Access Database

Figure 9 – Repair Corrupt Access Database

Step 4: After completion of the repair process, preview of recoverable Access database objects is displayed in a tree-like structure. In the left pane, all the recovered database objects will be listed. Click on an object to see its preview in the right pane of the Preview window.

Access Database Preview

Figure 10 – Access Database Preview

Step 5: To save the repaired data, click Save Database on File menu.

Save Database Option

Figure 11 – Save Database Option

Step 6: Select the destination to save the repaired database file.

Save Repaired File at a Desired Location

Figure 12 – Save Repaired File at a Desired Location

The file will be saved at the desired location.

How to Recover Access Database Manually?

Follow the steps in the same sequence given below to attempt Access database recovery:

Step 1: Restore Database from Backup

If you’ve created a backup of your Access database, try restoring the database from the backup copy. The detailed steps are listed below:

  1. Open File Explorer, select and copy the backup copy.
  2. Move the copied file to the same location where the corrupt database file is saved.
  3. When prompted, replace the existing db file with the backup copy.

For detailed information on restoring and backing up an Access database, read this: How to Backup and Restore Access Database?

Step 2: Delete Microsoft Access Lock Information (.ldb) Files

An .LDB file gets created when an Access db is opened or accessed for shared use (i.e. in a multi-user environment). The file has same name as that of the Access database, but is saved with an .ldb extension. The file helps in keeping track of all active users accessing the database.

When a user who last uses the database closes the database file, the lock file is deleted automatically. But, it might not get deleted if the user doesn’t have delete permissions to the Access database (.mdf) file or the database is corrupt.

Note: Deleting the .ldb file is important to remove the lock on .mdb file if you want to try to recover the data from that file.

Step 3: Use Jet Compact Utility 

Using the Jet Database Engine of Access helps auto-fix minor issues that crop up in the database from time-to-time, while reading and writing data. Due to this, in most cases, you may never even find out that something went wrong. This is both good and bad. Good because your work is not interrupted, bad because corruption can become worse if not treated on time and may cause data loss.

Step 4: Remove all Compiled VBA Codes from the Database

This can be done by using this command line switch from Microsoft:

C:\Program Files\Microsoft Office\Office\MsAccess.exe /decompile C:\DatabasePath\FileName.mdb

Note: You may need to change the path shown above for MsAccess.exe if you installed it to a different location.

Step 5: Import Corrupt Database Objects into a New Database

Try importing objects into a new Access database file by following these steps:

  • Open MS Access and create a new database file. To do so, click File > New > Blank Database.
  • Next, click the ‘External Data’tab and select ‘Access’ on ‘Import & Link’ menu.
Select Access under External Data

Figure 13 – Select Access under External Data

  • The ‘Get External Data – Access Database’ dialog box is displayed. Click ‘Browse’ and locate the database file that needs to be imported.
Select the Access Database File to Import

Figure 14 – Select the Access Database File to Import

  • Choose any option under ‘Specify how and where you want to store the data in the current database’, and click OK.
  • From the next window, select all database objects that you want to import and then click OK.

Note: This procedure might also help you repair Access database file that might have turned corrupt due to damaged system tables.

Wrapping Up

There can be umpteen reasons that can turn an Access database corrupt, including increasing database size, hardware or software failure, etc. You can try to manually compact and repair the database to resolve the issue. However, the MS Access built-in ‘Compact and Repair’ command may fail to repair a severely corrupted Access database. You can use Stellar Repair for Access to repair even severely corrupt Access database, quickly and efficiently. You can free download Access database repair software software and preview your repaired MS access database before saving it.

If you do not wish to repair the db and are looking for ways to recover its data, try implementing the step-wise instructions discussed in this post to extract as much data as possible manually. But, the manual troubleshooting steps does not guarantee recovering complete Access db. Stellar Repair for Access can also help you to recover all the Access database objects, like tables, deleted records, forms, modules, etc.

Comments(94)
  1. Ivo December 21, 2020
    • Eric Simson December 28, 2020
  2. Oded Ravinsky July 7, 2019
    • Eric Simson July 9, 2019
  3. Oded Ravinsky July 6, 2019
    • Eric Simson July 6, 2019
  4. Kevin Moore April 11, 2019
    • Eric Simson April 12, 2019
  5. Joanne February 25, 2019
    • Eric Simson February 27, 2019

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.