When setting up a new SharePoint farm, I always like to follow best practice and use an alias to connect to my SQL server. This past week I was setting up a single server development farm using Microsoft SQL Server 2014 and ran into the following errors while trying to connect to SQL Server after I had created my alias.
Attempting to connect to my SQL alias (sql-alias) I got the following error:
No connection could be made because the target machine actively refused it
Attempting to connect locally using the FQDN I got the following error:
Access is denied
Attempting to connect locally using hostname:
The reason for the connection issues above is that the TCP/IP protocol is disabled by default in SQL Server 2014.
To enable the TCP/IP protocol in SQL Server 2014, follow these steps:
- Open SQL Server Configuration Manager
- Expand “SQL Server Network Configuration” and click on “Protocols for MSSQLSERVER”
- Right click on “TCP/IP” and choose “Enable”
- Click “OK” on the Warning that the service will have to be restarted
- Click on “SQL Server Services”
- Right click on “SQL Server (MSSQLSERVER) and choose “Restart”
You should now be able to connect to your SQL server using FQDN or a properly configured SQL alias.