eNICQ 6 installation error - A network-related or instance-specific error occurred while establishing a connection to SQL Server.

Reported Issue: 

When trying to install the eNICQ 6 database locally using SQL Server Express an error appears saying "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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)". 

eNICQ 6 installer error

 

 

Root Cause: 

This error only occurs when someone is trying to create a named instance on SQL Server which the installer does try doing but the issue is with the installation of SQL Server 2019 Express failing. It means the account being used to install SQL Server does not have all the permissions required. The account being used during the installation not only needs to be able to install programs but it also needs "the right to back up files and directories, the right to manage auditing and the security log, and the right to debug programs."

You confirm this by going to https://www.microsoft.com/en-us/download/details.aspx?id=101064 and trying to install SQL Server Express 2019 manually. It will likely give you this message:


SQL Server 2019 Express Edition,Oops,Error message,Account running setup does not have full permissions

 

Resolution:

You will need to get escalated permissions which include all listed above. If that isn't possible someone with all those permissions will need to do the installation.