Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

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

share|improve this answer
thanks oleg dok – shamim Jan 29 '12 at 8:31

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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