< class="prominent-subhead ">

An error appears during installation of K2 Five Fix Pack: 'Could not open a connection to SQL Server'

This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.


When installing the K2 Five Fix Pack on a server with a development license, the following error is logged in the Fix Pack installer trace log:

"DBQuery.RunQueryRetryable: Query: SELECT [VariableValue] FROM [HostServer].[Configuration] WHERE [VariableToken] = '[HOSTSERVERNAME]' >> RetryableExecution.ExecuteRetryable: Failed executing 'RunQueryRetryable'. Exception: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"


This issue can occur in the following scenarios:

  1.  You run a fix pack installation on a server with a development license
  2.  Your server has an expired K2 license key
  3.  The account which you use to run the fix pack installer, does not have SQL Server side permissions.


  1.  In the case of scenario 1, try re-running the fix pack installation by logging on to the server with a K2 service account. This is specific to the servers with development licenses.
  2.  A similar error may appear when your server is not licensed (it has an expired license key). Address the license key issue first and then re-run the fix pack installation.
  3.  If you're running a fix pack installer after logging on to the server with a K2 service account and your license key is in order, but it still fails, try to run a SQL Server trace while running the fix pack installation which may show you if there are any other problems, i.e. missing SQL Server side permissions.

According to the K2 Five installation and configuration guide, the K2 installation account requires the following SQL server side rights: dbcreator securityadmin

Source: K2 Five Installation and Configuration Guide - Required Permissions