I have been trying to connect to a SQL Server instance. When I use the IP address, it connects. But when I use the server name, it doesn't. The main reason why I need to use the name is because I want to setup replication.

This is the error I am getting:

"Failed To Connect" error

Any ideas on what I could be missing?

I am in a Windows environment and I used the machine IP. Firewall is opened for port 1433 TCP.


1 Answer 1


Looks like name resolution is not working. Do you have a DNS server? If not, you may have to make entries in the hosts files on both computers to enable name resolution. The hosts file on Windows is at c:\windows\system32\drivers\etc\hosts.

Try using FQDN. If the server is in a different domain, and a host record is not created in DNS, this would be required to resolve. You could also try creating an alias in SQL Server Configuration Manager.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.