databasedev.co.uk - database solutions and downloads for microsoft access

Compact and Repair a Microsoft Access Database file

Why Compact and Repair your Microsoft Access Database?

Microsoft Access databases are uniquely designed to allow databases to consistently increase in size, unless you compact them. When you delete a record from a Microsoft Access database, the space allotted for that record continues to be held in reserve by the database and it is not released for reuse. Likewise, extra space, created by modifying and shortening records, is not released for reuse.

If you never compact your Microsoft Access database, your database will retain the "wasted" space and continue to consume additional space to accommodate additional data. As an example, if you delete all of the records from a 1MB Microsoft Access database and then add 2MB of data, your database will be in excess of 3MB. The 1MB of space, which was allocated to the deleted records, is held by the database as wasted space, which only serves to corrupt your database and fragment your data.

To avoid generating excess amounts of wasted space and corrupting your database, you must compact your database periodically. Microsoft Access provides a Compact and Repair Utility, which performs two separate functions. First, it compacts the database to eliminate wasted space and, secondly, it attempts to repair the database, if it was corrupted.

The Compact Utility reduces the physical size of your database by making an exact duplicate of the database while also ridding the database of any excess space created by deleting and modifying data. Compacting is the only way to reduce the size of your database. The Compact Utility restructures table records and objects, and then stores them in successive memory blocks, eliminating wasted space. The utility also updates table statistics to reflect database characteristics of the restructured data. The more additions, deletions and modifications performed on databases, the more often they should be compacted

Should you fail to compact your database and it results in database corruption, the Repair Utility attempts to de-fragment and repair corrupted database objects. The Repair Utility will only attempt to restore corrupted tables, queries and indexes. It does not restore the other database objects: forms, reports modules and macros. These objects can only be recovered from a backup.

The Compact and Repair utility, installed with Microsoft Access, has limitations and may not fully recover your databases, their objects or their data management functions. You may find it more plausible to seek software from third party vendors, which have specifically designed software for the purpose of compacting and/or repairing corrupted databases. In order to, successfully, compact a Microsoft Access database; the database must not be in use. These third party solutions offer automated methods of monitoring database access and preventing access during compaction. In addition, the Microsoft Access installed Compact and Repair utility will open and close the database before reopening the database to compact it. If your database is corrupted, Microsoft Access may not be able to reopen the database to compact it. A third party database recovery solution may provide the capability to detect and compact a corrupted database without having to close it.

If you are still experiencing problems with Microsoft Access database corruption and attempting to Compact and Repair the database, and need to recover your Microsoft Access data, it may still be repairable.

databasedev.co.uk recommends Access Database Repair and Recovery Software from Cimaware.com

AccessFIX repair and recovery software downloadsAccessFIX is an Access database repair and recovery Software that restores damaged MS Access files, rebuilding the table data. This utility works with MS Access 95, 97, 2000, XP, and 2003

Restore your database files easily in only 15 minutes:

Download the free database repair and recovery software demo now to evaluate the recovery capabilities of the program. Once AccessFIX demo is installed you will easily recover your database file and view the results with only a few clicks.

Readers of this article may also like to check out other articles on this subject: