How to Compact and Repair an Access 2007 Database

How to Run Compact and Repair to Prevent Access Database Corruption

Coworkers discussing data on digital tablet
You can run compact on Microsoft Access easily. Thomas Barwick / Getty Images

Over time, Microsoft Access 2007 databases grow in size and use disk space unnecessarily. Access creates hidden objects for tasks, and those hidden objects sometimes remain in the database after they are no longer needed. Similarly, deleting a database object may not release the disk space it occupied. Eventually, performance suffers.

Additionally, repeated modifications to the database file may result in data corruption.

This risk increases for databases shared by multiple users over a network. For both these reasons, it's a good idea to proactively run the Compact and Repair Database tool to ensure the consistency of your data. If your database is corrupted, Access prompts you to run the Compact and Repair command.

Running Compact and Repair on an Access Database

  1. Instruct other users to close the database. You must be the only user with the database open in order to run the tool.
  2. Click the Microsoft Office button.
  3. From the Office menu, choose to Manage in the left column, followed by Compact and Repair Database to open the  "Database to Compact From" dialog box.
  4. Navigate to the database you want to compact and repair and then click the Compact button.
  5. Provide a new name for the compacted database in the Compact Database Into dialog box and click the Save button.
  6. Verify that the compacted database works properly.
  1. Delete the original database and rename the compacted database with the original database's name. (This step is optional.)

Tips

Remember that compact and repair creates a new database file. Therefore, any NTFS file permissions you applied to the original database do not apply to the compacted database.

It's best to use user-level security instead of NTFS permissions on your database for this reason.

Format
mla apa chicago
Your Citation
Chapple, Mike. "How to Compact and Repair an Access 2007 Database." ThoughtCo, Nov. 3, 2017, thoughtco.com/compact-and-repair-an-access-database-1019937. Chapple, Mike. (2017, November 3). How to Compact and Repair an Access 2007 Database. Retrieved from https://www.thoughtco.com/compact-and-repair-an-access-database-1019937 Chapple, Mike. "How to Compact and Repair an Access 2007 Database." ThoughtCo. https://www.thoughtco.com/compact-and-repair-an-access-database-1019937 (accessed May 26, 2018).