Compacting and Repairing a Database
October 19th, 2005As you work with a database, it can become fragmented so that it uses disk space inefficiently. Compacting the database rearranges the way the database file is stored on the disk so that it takes up less disk space and works more efficiently.
In addition, it’s possible that your database can become damaged or corrupted, although this is not a common occurrence. Typically, a damaged database will behave unpredictably. For example, a search may not display any records, new records may not appear, or deleted records may still show up in a table. In some cases, Access will inform you that your database is damaged when you try to open it.
To compact and repair the current database:
- Select Tools | Database Utilities | Compact and Repair Database.
- Access will compact and repair the database.
You can also compact and repair a database that is not open. For this to work, you must not have any database open. Also, when you compact and repair a database that is not open, Access will create a copy of the database and compact and repair the copy. The original will not be compacted and repaired.
To compact and repair a database that is not open:
- Make sure that no database is open.
- Select Tools | Database Utilities | Compact and Repair Database.
- Access will display the following dialog box:
- Select the database you want to compact. Change drives and/or folders, if necessary.
- Click the Compact button.
- Access will display the following dialog box:
- Type a new name for the database. Change drives and/or folders if necessary.
- Click the Save button.
- Access will create a copy of the database, using the name you specified, then compact and repair the new database.


TIP: When Should You Compact a Database?
It’s a good idea to compact your database after you delete information.
One Response to “Compacting and Repairing a Database”
Leave a Reply
You must be logged in to post a comment.
June 2nd, 2008 at 10:05 am
[…] Compacting and Repairing a Database […]