When attempting to open the "Patch Assessment Viewer" the following error messages are displayed:
Could not complete the last task.
The communication has failed while invoking the requested operation. Please check logs.
Clicking on 'Advanced' shows the following message:
Sophos.UIController.Extension.UIControllerException: The communication has failed when invoking the requested operation. ---> System.ServiceModel.FaultException: PatchFrontEnd.LoadReportFilters : System.Data.SqlClient.SqlException : Cannot open database "SOPHOSPATCH51" requested by the login. The login failed.
Login failed for user '[ComputerName|DomainName]\db'.
Note: The database name in the above error will vary depending on the version of the console that you are running i.e. SOPHOSPATCH51 or SOPHOSPATCH52
You may also see the following in the Application event log:
- Event ID 1030 (source='Sophos Patch', Event Category='Sophos Patch Server Communicator')
- Event ID 3000 (source='Sophos Patch', Event Category='SQLTasks')
First seen in
Enterprise Console 5.2.0
Enterprise Console 5.1.0
The database account does not have access to the Sophos Patch database.
This is commonly seen when the following conditions are true:
- Sophos Control Center (SCC) has previously been upgraded from version 2 to SCC 4 and then upgraded to Enterprise Console 5.1 or 5.2
- The database account is not administrative.
For more information please see the 'Technical Information' section at the bottom of this article.
What To Do
On the computer hosting the database, run the following commands:
sqlcmd -E -S .\sophos -d SOPHOSPATCH51 -i "C:\Program Files\Sophos\Enterprise Console\ResetUserMappings.sql"
sqlcmd -E -S .\sophos -d SOPHOSENC51 -i "C:\Program Files\Sophos\Enterprise Console\ResetUserMappings.sql"
Note: 'Program Files' is 'Program Files (x86)' on a 64-bit computer. The database name will need to be modified to match the version of Enterprise Console. For version 5.1 se SOPHOSPATCH51, SOPHOSENC51. For version 5.2 use SOPHOSPATCH52, SOPHOSENC52.
Once complete you should be able to launch the "Patch Assessment Viewer".
When SCC 2 was uninstalled by the SCC4 installer, the Windows group 'Sophos DB Admins" was removed and then re-created. This broke the mapping between the Windows group and the SQL Login. This did not cause a problem with SCC 4 as the database was accessed by the Sophos Management Service in the context of the system account. When SCC4 is upgraded to SEC 5.1 the 'database' account is used. The SEC 5.1+ installer fixes the mapping issue by dropping and creating the SQL login and re-mapping it to the Windows group 'Sophos DB Admins'. It then fixes up the mapping for the SOPHOS51 database but does not fix the mapping for the SOPHOSPATCH51 and SOPHOSENC51 databases.