I had a SQL server instance up and running for a long period of time. The SQL server instance was installed with a valid product key. All of a sudden, none of my applications were able to connect to the server instance. I tried opening SQL Server Management Studio to check what’s going on. It threw the following error:

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) (Microsoft SQL Server, Error: 2)

Now, I had no idea what this meant. However, I checked Windows services (services.msc). Afterwards, I attempt restarting the SQL Server service, but it throws an error message saying that Windows cannot start the SQL server with an error code: 17051. Upon looking this up, it turns out that it means that the SQL Server evaluation period has expired.

Although, I am 100% sure that I used a product key during installation, but this still sounds like an easy fix. I rerun the SQL Server installation file and attempt to upgrade my SQL Server. The installation process runs smoothly until it just fails when running the SQL engine health check (Engine__SqlEngineHealthCheck). I bang my head against the wall trying to figure this one out.

After spending too much time on this, it turns out that there is actually an option to skip the SQL Engine Health Check for the upgrade to succeed. To use this opttion, however, the installation has to be triggered from a Command Line Prompt. To do this, use the upgrade parameters listed here and append to your parameters this option: /SkipRules= Engine__SqlEngineHealthCheck. This fixed it all for me.