Knowledge Base
5.7.7
Search this version
Knowledge Base
Knowledge Base
Errors and Troubleshooting
Features and Functionality
Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
How do I repair a corrupted MetaDefender Email Gateway Security database?
Copy Markdown
Open in ChatGPT
Open in Claude
This article applies to all MetaDefender Email Gateway Security V4 and V5 releases deployed on Windows Systems.
- First, download the mdes_ps.zip file here.
- Before extracting the archive, ensure that it is not blocked by Windows. Read This to learn more.
- Extract the archive to a temporary folder such as, for example: c:\mdes_ps.
- Stop the MetaDefender Email Gateway Security service by opening an elevated Powershell and typing net stop mdemailsecurity.
- Copy the file C:\Program Files\OPSWAT\MetaDefender Email Security\data\mdemailsecurity.db.sqlite to the same location that you extracted the file in step 3, for example: c:\mdes_ps. This file will be used in an attempt to repair the database corruption.
- In an elevated Powershell (with admin permissions), run the following script.
Powershell
cd \mdes_psImport-Module c:\mdes_ps\mdes.dllSet-mdes.Repair -File c:\mdes_ps\mdemailsecurity.db.sqliteThe repair process may take a few minutes to run to completion. Provided there are no errors reported in the shell, your attempt to repair the corrupted database was a success.
- Back up the original C:\Program Files\OPSWAT\MetaDefender Email Security\data\mdemailsecurity.db.sqlite file to a secure, alternative location.
- Copy the c:\mdes_ps\mdemailsecurity.db.sqlite file to C:\Program Files\OPSWAT\MetaDefender Email Security\data.
- Restart the MetaDefender Email Gateway Security service by opening an elevated Powershell and typing net start ServiceName.
- Verify that your emails are now processing as intended.
In the unlikely event that you have followed the instructions above but are Unable To Repair A Corrupted MetaDefender Email Gateway Security Database , please open a Support Case with the OPSWAT team via phone, online chat or form, or feel free to ask the community on our OPSWAT Expert Forum.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message
