Failure to log in using just the server name

Posted on

Question :

I have more than one PC connected by LAN that I access from Server Management Studio.

When I try to connect with the DB server, if I place the server IP instead of the server name in the serverName field, it works fine, and I can log in.

If I use the server name, why does logging in fail? How can I resolve this issue?

Answer :

Check if server name you use resolved to valid IP address: ping SERVERNAME gives you the same IP address as you assumed it has to be

Also check if you have a valid spn

Setspn.exe is a command line tool that enables you to read, modify, and delete the Service Principal Names (SPN) directory property. This tool also enables you to view the current SPNs, reset the account’s default SPNs, and add or delete supplemental SPNs.

The following example illustrates the syntax used to register manually register an SPN for a TCP/IP connection.

setspn -A MSSQLSvc/ accountname

Leave a Reply

Your email address will not be published. Required fields are marked *