Could not get a valid state for MSSQL$SOPHOS (# 0) - Ensure this service is started then click the OK button

  • Article ID: 111645
  • Updated: 19 Jun 2014

Symptoms
When running either the Sophos Enterprise Console or Sophos Control Center installer, the following error is shown:

 

Could not get a valid state for MSSQL$SOPHOS (# 0)
Ensure this service is started then click the OK button

 

Other errors seen along with the error shown above are:

  • On screen:
    • RunAllScripts2Imp: batch file returned error code
  •  

    In the Installdb.log file:
    • [DBMSLPCN]SQL Server does not exist or access denied.
      [DBMSLPCN]ConnectionOpen (Connect()).

       

    • [SQL Native Client]Named Pipes Provider: Could not open a connection to SQL
      Server [2].
      [SQL Native Client]Login timeout expired
      [SQL Native Client]An error has occurred while establishing a connection to
      the server. When connecting to SQL Server 2005, this failure may be caused by
      the fact that under the default settings SQL Server does not allow remote
      connections.

NOTE: The RunAllScripts2Imp error and the Installdb.log errors can occur idependently from this error. This article will only fix a "Could not get a valid state for MSSQL$SOPHOS..." error. If you have either of the other errors without the error in this article, please search the knowledgebase.

Known to apply to the following Sophos product(s) and version(s)

Sophos Control Center
Enterprise Console

Cause
The existing SQL Server (SOPHOS) instance has been detected but cannot be accessed.

What to do

If you have not already done so, allow the installer to roll back.

1. Confirm the state of the SQL Server (SOPHOS) instance

  1. Open Windows Services (Start | Run | type services.msc | OK)
  2. Scroll down the list of services and locate any service beginning with "SQL Server...".
  3. Check whether the SQL Server (SOPHOS) service is listed or not.
  4. Open a Command Prompt (Start | Run | type cmd.exe | OK)
  5. Type: osql -L
  6. Check the servername\SOPHOS instance is listed as an available SQL server named instance or not.

2. Recreate the SQL service registry key

If the SQL Server (SOPHOS) service is not listed in Windows Services, but the SOPHOS instance name is returned in the Command Prompt, then the SQL Server (SOPHOS) service needs to be recreated:

  1. Open the registry editor (Start | Run | type regedit.exe | OK)
  2. Browse to the following registry key:
    HKLM\System\CurrentControlSet\Services\
  3. Right-click the key and select Export.
  4. Save the file to a location on the local server.
  5. Download the following registry key:
    msqlsophosServiceKey.reg.txt
  6. Remove the .txt from the registry file name, and then import the .reg file into the server's registry (within the Registry editor, select File, Import).
  7. Reboot the computer.

3. Confirm the SQL Server (SOPHOS) instance can now be accessed

  1. Open a Command Prompt (Start | Run | type cmd.exe | OK)
  2. Type: osql -E -S .\sophos and then press the Enter key.
  3. The command should return to a prompt with:
    1>
  4. Type: exit
  5. Close the Command Prompt.
  6. Run the installer again.

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

Rate this article

Very poor Excellent

Comments