Table of Content
    Access Database Repair

    How to Repair Microsoft Access Database Files and Recover Data?


    Table of Content

      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. If nothing works, use Stellar Repair for Access software to repair your database and recover its objects without downtime.

      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).

      Following are other reasons that may lead to Access database corruption:

      • Frequently editing data in Memo fields
      • Interruption when making changes to data
      • Virus or malware attack
      • Hardware failure or software bugs
      • Improperly designed plug-ins can cause the MS Access application to crash
      • Jet database engine version conflicts

      For detailed information on the reasons leading to Access database corruption, refer to the blog: Top 10 Access Database Corruption Causes

      How to Repair Microsoft Access Database?

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

      You can fix the corrupted database manually or use DIY (do-it-yourself) software.

      Method 1- 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.

      a. Steps to Compact And Repair the Open Database:

      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:

      • In your Access database, click File.
      • From the window that appears, click the Compact & Repair option on the ‘Info’ page.
      Compact and Repair option in MS Access

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

      b. Steps to Compact And Repair the Database You Cannot Open:

      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. These steps apply to Access 2013, 2016, and 2019.

      • Open your MS Access program.
      • From the ‘templates’ screen, double-click ‘Blank desktop database’.
      Open a Blank desktop database
      • In your Access program, click the ‘File’ menu. Next, click ‘Close’ to exit the database.
      • Click Database Tools > Compact & Repair Database.
      Select Compact and Repair Database
      • In the ‘Database to Compact From’ dialog box, locate the corrupt Access database file and double-click on it.
      Double-click the corrupt Access Database you want to Compact
      Double-click the Access Database
      • When the ‘Compact Database Into’ window opens, specify a new name for the compacted and repaired database, and click ‘Save’.
      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 the original database (i.e. Test_db).

      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.

      Method 2- Use Stellar Repair for Access Software

      Stellar Repair for Access is powerful DIY software you can use to repair and recover .MDB/.ACCDB file in a few simple steps. This Access database repair tool previews all the recoverable database objects like tables, deleted records, queries, forms, reports, etc.

      This is useful for the users to verify the data accuracy before saving it.

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

      • Download, install and run Stellar Repair for Access software.
      Free Download
      • In the window that pops-up, use the ‘Browse’ or ‘Find’ option to select the corrupt file.
      Browse or Search Corrupt Access Database File
      • Click ‘Repair’ to start the repair process.
      Repair Corrupt Access Database
      • After completion of the repair process, a 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
      • To save the repaired data, click ‘Save Database in the ‘Home’ Tab.
      Save Database Option
      • Select the destination to save the repaired database file.
      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 the Database from the 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:

      • Open File Explorer, select and copy the backup copy.
      • Move the copied file to the same location where the corrupt database file is saved.
      • 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 the 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 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 the .mdb file if you want 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, and bad because corruption can worsen 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 in 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 the ‘Import & Link menu.
      Select Access under External Data
      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
      • Choose an option under ‘Specify how and where you want to store the data in the current database.’ Click OK.
      • Select all database objects you want to import from the next window and then press the OK button.

      Note: This procedure might also help you repair the 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 manually compact and repair the database to resolve the issue.

      However, the MS Access built-in ‘Compact and Repair’ command may fail to fix a severely corrupted Access database. In that case, you can recover data from the corrupted database by implementing the instructions discussed in this post.

      However, the manual troubleshooting steps do not guarantee to recover the complete Access database. Stellar Repair for Access can also help you repair severely corrupt Access databases and recover all the database objects.

      Was this article helpful?

      No NO

      About The Author

      Charanjeet Kaur linkdin

      Charanjeet is a Technical Content Writer at Stellar®who specializes in writing about databases, e-mail recovery, and e-mail migration solutions. She loves researching and developing content that helps database administrators, organizations and novices to fix multiple problems related to MS SQL and MySQL databases and Microsoft Exchange.

      94 comments

      1. Sending my database for repair was out of the question since my access database contained extremely confidential data.
        After ambling around for solutions, I came across your article, which compelled me to give the demo version of Stellar Repair for Access a try.
        I thought this was also one of that software, which makes big promises but fails to deliver, but this was not the case.
        I was able to preview all the objects in the demo version, so I immediately bought the software, and the software performed as promised.
        Thanks for sharing such a valuable piece of information, looking forward to more of your informative posts.
        Thanks and regards,
        Jamie Anderson

      2. My Access Database was corrupted I’ve tried to repair it with compact &repair tool but not recovered the file. now I’ve tried to download your free tool but the downloaded file have no extension so its not work so please provide me the trial version to check your products performance to buy full version

      3. Hello Jyoti,
        I have a database on network drive which is used by many users, the size of .mdb file is 26 mb. It got corrupt many times and shows different errors each time. Could you please help me in fixing this issue.
        Thanks.

      4. Hi ,
        I am working on Access 2007 , when i tried ” repair and compact” the Entire File got deleted by itself and i am not able to find where the file is moved now … Pl help …

        1. Hi Ashwin,

          When a file compacts, it creates a copy of itself usually named db.accdb or database.accdb and once it’s finished it deletes that file and puts back the original file. That said, if anything happens to interrupt that process the file would self-delete which is why we always recommend they attempt the repair on a copy of the file.

          Therefore, if you cannot find it anywhere, including your recycle bin then it is gone. In this case, you can try Stellar Windows Data Recovery software to recover your deleted file. Know more about this software from here.

      5. Hello,

        I got the corruption in MS Access database. I read about compact and repair option during my training so tried it first, but not restored my complete data. Few data entries were missing from the table. Stellar Access database repair fixed the corruption.

      6. I have just bought this product to repair an access database. I have ran it and it said the database was recovered successfully but when I go to save it I get the following error: “Unable to stablize the connection, please restart the application”. I have restarted several times but have had no luck. Can you help?

        1. Hi Eithne,

          In this situation, you can contact our support team at support[at]stellarinfo[dot]com

          Good Luck!

      7. Hi I have used This software but all the tables are not there,
        what can I do? to get them back? please help

        thanks

        Jim

        1. Hi James,

          After scanning the corrupt file, A user is able to see the preview of data including tables, triggers, view, functions etc. You are unable to see the table it means, the file is severely corrupted.

          You can also contact our support team at support@stellarinfo.com

          Good Luck!

      8. Hello I have backend in ms access 2010 on the network and the front end on the local c:\ drives. Last week it started running really slow. I compacted both front end and back end. What more can I do? Would rebuilding the backend help?

        1. Hi Marco,

          There are several reasons that make the database performance slow:

          • Unnormalized tables
          • Garbage values
          • Virus or malware

          With all these, if that printer is a network printer, then the slow down can occur when access attempts to check/inquire about the printer (and it does this for things like form design, report design, and a good number of other places where you would not expect such slow downs).

      9. I found that, when I closed the database then ldb was automatically deleted. If user doesn’t have the delete right, then it is not possible to delete the ldb file when the database is opened.​

      Leave a comment

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

      Image Captcha
      Refresh Image Captcha

      Enter Captcha Here :

      Related Posts

      WHY STELLAR® IS GLOBAL LEADER

      Why Choose Stellar?

      • 0M+

        Customers

      • 0+

        Years of Excellence

      • 0+

        R&D Engineers

      • 0+

        Countries

      • 0+

        PARTNERS

      • 0+

        Awards Received