Enterprise Console 4: PurgeDB.exe fails to run on a 64-bit operating system

  • Article ID: 66929
  • Rating:
  • 1 customers rated this article 4.0 out of 6
  • Updated: 17 Jul 2013


When running PurgeDB.exe ("C:\Program Files (x86)\Sophos\Enterprise Console\PurgeDB.exe") on a 64-bit operating system the following error is returned:

PurgeDB error (1): Unknown error in the PurgeDB tool.
- Object reference not set to an instance of an object.
Use 'PurgeDB -help' for command help.x

Technical information

PurgeDb.exe attempts to obtain the database connection string from the following registry location:
"HKLM\SOFTWARE\Sophos\EE\Management Tools\DatabaseConnectionMS"
if this value does not exist, the error above is displayed.

Note. This is a known defect (DEF50924) that was fixed in Enterprise Console version 4.5.

What To Do

  1. From the following registry value, copy the connection string that the Sophos Management service uses to connect to the database:
    "HKLM\SOFTWARE\Wow6432Node\Sophos\EE\Management Tools\DatabaseConnectionMS"
    it should take the form:
    Provider=SQLOLEDB;Integrated Security=SSPI;Initial Catalog=SOPHOS4;Data Source=SERVER1\SOPHOS;
    where SERVER1 in this example is the name of the server where the SOPHOS database resides.
  2. Navigate to the directory "C:\Program Files (x86)\Sophos\Enterprise Console".
  3. Open the file "PurgeDB.exe.config" in a text editor, for example Notepad.
  4. Locate the text:
    <setting name="ConnectionString" serializeAs="String">
  5. Insert the connection string as obtained in step 1 to the value tags as shown in the example below.
    <setting name="ConnectionString" serializeAs="String">
    <value>Provider=SQLOLEDB;Integrated Security=SSPI;Initial Catalog=SOPHOS4;Data Source=SERVER1\SOPHOS></value>

    Save "PurgeDB.exe.config".
  7. Use PurgeDB.exe as required.

If you need more information or guidance, then please contact technical support.

Rate this article

Very poor Excellent