Monday, April 25, 2011

SQL 2005 instance won't work with DNS

Basically I have a sql 2005 standard server with a named instance installed (server/instance1). I also have created a DNS entry (dnsDBServer) that points to the ip address of the sql server. A web application we have can connect using the following methods (ipaddress/instance1, server/instance1) but cannot connect using the dnsDBServer/instance1. Of course this sort of defeats the purpose of the dns entry. Was wondering if sql aliases would help fix this problem or if anyone has a solution. Thanks.

From stackoverflow
  • Most likely your DNS resolution isn't working exactly like you thought it would.

    Do a tracert from the machine that is trying to talk to your sql server and see where it's going to.

    You should also look at the firewall settings between the requesting machine and the server to see if there is anything else affecting it.

    Mike T : I can ping (and use tracert) the dnsDBServer and it points to the correct ip address. I am using the fully qualified domain suffix as well. I did notice that if I create a .udl on my desktop and connect using the dnsDBServer/instance1 it works just fine. That is using the SQL Native client.
    Chris Lively : Then post your code that performing the connection. Maybe we can see what the problem is with it.
  • Is there a domain mis-match? eg server.bob.net, dnsDBServer.fred.com?

    1. Use ping -a to see what the domain resolution is for both DNS alias and server name.
    2. Also, in the DNS settings of a client, check the "Appends these DNS suffixes (in order)" list.
    3. Can SSMS on the SQL box connect to dnsDBServer\instance1?
    4. tracert as suggested already
    Mike T : I am able to connect the dnsDBServer/instance1 from SSMS and from a .udl on my machine. Is there something in the provider I'm using? See above comment as well.
  • ha, I just realized that the web server (which is the same server the sql server runs on) didn't have it's own dns updated. I should have checked that first thing. I ran ipconfig /flushdns and it started working. It never dawned on me to check the server itself. Thanks for your help.

0 comments:

Post a Comment