Hi @Peter_1985 ,
Please follow below steps to troubleshot the issue,
- Make sure SQL Server Service is running
- If a named instance, make sure SQL Server browser service is running. Make sure the instance name is spelled correct and there is actually such an instance on your target machine.
- If this is remote connection. Please make sure SQL Server is configured to allow remote connections and you have enabled TCP\IP protocol
- Examine the SQL Server error log for messages confirming that SQL is listening on the expected network interfaces and ports
- Test server connectivity with PING from the client machine
- Test port connectivity using TELNET to the server and port (from step 4) from the client machine. For example
TELNET <server-name> 1433 - Check firewall settings if step 5 or 6 connectivity test fails. Configure the firewall on the server instance of SQL Server to open ports for SQL Server and the SQL Server Browser port (UDP 1434).
If you have some confuse about the steps, please refer to Resolving could not open a connection to SQL Server errors to get more information.
If it is not work, please let us know .
If the response is helpful, please click "Accept Answer" and upvote it, thank you.