Overview
This article will guide you on how to compact and repair an MS Access database.
Compacting and repairing an MS Access database is necessary if one of the following scenarios are encountered:
- A MailEssentials backend Access database has grown very large.
- A MailEssentials backend Access database has been compromised or corrupted.
Currently, MailEssentials does not perform the compaction and repairing of the databases automatically, so manual intervention may be required.
Information
Prerequisites
This procedure requires you to have the Microsoft Access application installed either on the MailEssentials server or on another machine. If you don't have access to Microsoft Access in your environment, you may try to use the Jet Compact Utility.
This utility is not supported by GFI. Please check the software requirements for this utility, if you decide to use it.
Backing up the existing database
Always make a backup of the database before attempting any of the following steps. Should anything go wrong, you can always restore your MailEssentials instance to its previous state from the backup. Feel free to contact support for assistance in this matter if you're uncomfortable with the steps.
Backing up the database is a straightforward process:
-
Navigate to where the database is stored.
NoteAs an example, the Antispam configuration database is found in:
...\GFI\MailEssentials\Antispam\config.mdb
- Copy the .mdb file(s) to a different location
Restoring from the backup is equally straightforward:
- Navigate to where you copied the .mdb file(s)
- Copy the files back to their original location while overwriting any existing ones.
Stop the MailEssentials services
The MailEssentials services need to be stopped.
Open the Windows Services Manager by navigating to Start > Run > services.msc and stop the following services:
- Microsoft Exchange Transport service
- GFI List Server
- GFI MailEssentials Attendant
- GFI MailEssentials AS Scan Engine
- GFI MailEssentials Autoupdater
- GFI MailEssentials AV Scan Engine
- GFI MailEssentials Backend
- GFI MailEssentials Legacy Attendant
- GFI POP2Exchange
- GFI MailEssentials Quarantine Action Services
MS Access is available on the MailEssentials server
If MS Access is available on the server, you can open a command line as an Administrator and use the following command to perform compact and repair.
msaccess <path to database file>\<database file name> /compact
As an example, in the case of the Antispam configuration database, the command above will look similar to this:
msaccess C:\Program Files (x86)\GFI\MailEssentials\Antispam\config.mdb /compact
MS Access is available on another machine
If MS Access is available on another machine, and follow the steps below:
- Copy the database file(s) to that machine.
- Open each file in Microsoft Access.
- Go to Database Tools.
- Click Compact and Repair Database.
- Once all files have been processed, close Microsoft Access.
- Copy the files back to their original location while overwriting any existing ones.
It is not recommended to let an .mdb file exceed 1.7GB in size.
Start the MailEssentials services
The MailEssentials services previously stopped, need to be started back up.
Open the Windows Services Manager by navigating to Start > Run > services.msc and start the following services:
- Microsoft Exchange Transport service
- GFI List Server
- GFI MailEssentials Attendant
- GFI MailEssentials AS Scan Engine
- GFI MailEssentials Autoupdater
- GFI MailEssentials AV Scan Engine
- GFI MailEssentials Backend
- GFI MailEssentials Legacy Attendant
- GFI POP2Exchange
- GFI MailEssentials Quarantine Action Services