Database connection fails with: Test connection failed because of an error initializing provider.

  • Article ID: 35922
  • Updated: 12 May 2014

Issue

When performing a UDL database connection test the following error is seen:

Test connection failed because of an error initializing provider. Cannot open database "SOPHOS50" requested by the login. The login failed.

Note: 'SOPHOS50' shown above could be replaced by any of the Sophos database names.

First seen in

Sophos Enterprise Manager 4.7.0
Sophos Control Center 4.0.0
Enterprise Console 4.5.0

Cause

There are various reasons for the UDL test to fail.  The error seen is a high level error which does not point to a singular problem.

What To Do

The error generally means the database being tested cannot be contacted.  Therefore you must check and confirm the following:

  • Check the SQLServer(SOPHOS) (or other named instance hosting the Sophos database(s)) is started and can be restarted.
  • Check the physical database files exist.
    For example the default installation path for Enterprise Console 5.0 is: C:\Program Files\Microsoft SQL Server\MSSQL10.SOPHOS\MSSQL\DATA\
    The database files for console v5 (with Sophos Patch) are:
    • Sophos Enterprise Console: SOPHOS50.mdf and SOPHOS50_log.LDF
    • Sophos Patch Server: SOPHOSPATCH.mdf and SOPHOSPATCH_log.LDF
  • Check the databases are attached to the SQL instance.
    1. Open a command prompt (Start | Run | Type: cmd.exe | Press return).
    2. Type: sqlcmd -E -S .\sophos -Q "select name from sysdatabases"
      The databases attached to the SQL instance are shown and the list should contain the associated Sophos databases names.
  • Using Microsoft SQL Server Management Studio Express check the database appears correctly without a warning icon on any type next to the database name (see links to screen shots below).  Problems with the database that are shown in SQL Server Management Studio include: These issues can be resolved by checking the database tasks menu and the database Properties | Options menu.
  • Check SQL security permissions.  This error can occur when you have not allowed your SQL user account access to the database.

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

Rate this article

Very poor Excellent

Comments