When attempting to "purge" or "delete" Sophos Update Manager (SUM) related errors or alerts, PurgeDB.exe always returns:
PurgeDB: 0 rows have been affected.
What to do
Use the following workaround:
- Locate the file ActionMapping.xml in the directory "%programfiles%\sophos\enterprise console\" and make a backup of this file, e.g. ActionMapping.xml.orig.
- Open ActionMapping.xml in a text editor, for example Notepad.exe.
- Locate the lines:
<Type name="SUM" value="SUM" />
<Type name="SUMAlert" value="SUMALERT" />
and update them to read:
<Type name="SUM" value="SDDM" />
<Type name="SUMAlert" value="SDDMALERT" />
- Save the file.
- Re-run the PurgeDB command you were executing.
In the "Errors" table of the SOPHOS4 database, the "Source" of messages from Sophos Update Manager (SUM) can be either "SDDMAlert" or "SDDM". PurgeDB.exe uses a config file called ActionMapping.xml to map the command line parameter values to those in the database.
For Example, the following command will clear an outstanding Migration Failed alert against all SUMs
purgedb -action=delete -category=errors -HistoryLengthInDays=0 -type=SUMAlert -code=-2147220444
However this passes on type=SUMAlert as the Source and therefore makes no matches in the database. The "What to do" section of this article corrects the mapping.