SQL Server 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.suffix.com) 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.suffix.com/instance1. Of course this sort of defeats the purpose of the dns entry.

    I am able to connect to dnsDBServer.suffix.com/instance1 using management studio and a with .udl on my machine. Is there something with the provider the web app is using?

    Was wondering if sql aliases would help fix this problem or if anyone has a solution. Thanks.


    ,

    Mike Thien

  • Asp.net does not use UDL or DNS it uses integrated security or SQL permissions like the code below, what you are looking for is very old data access.

    Data Source=INSTANCENAME;Initial Catalog=AdventureWorksLT2008;Integrated Security=True

    Kind regards,
    Gift Peddie

  • Can you ping the db server using that DNS from the web server? If so, is it showing the expected ip address?

  • In our case we are using sql permissions in the web.config. I only mentioned the .udl since it is using the SQL Native client and it connects just fine. I'm wondering if our connection string or provider is the problem. For some reason I can't post the code so see the attachment of what the web.config looks like.


    ,

    Mike Thien

  • No in .NET 2.0 the ADO.NET connection string and property changed, if you have BI studio you could see the difference and before 2008 Asp.net was only using Native client implicitly.

    Your connection string may be for an older Asp.net application because that connection is not used now.

    Kind regards,
    Gift Peddie

  • I'm confused, when you say you are failing to connect are you talking about a login error, or a failure to connect to the server?

    You indicated that you can connect by providing the IP address from that server; if you are keeping the same credentials and changing just the ip address for a domain name and it fails, then you have a DNS problem - that server is unable to obtain an IP address. I'm no network expect, but you can try running "ipconfig /flushdns" from a command line, or add the IP mapping to your hosts file (although the latter probably should only be a temporary measure in case the ip address changes in the future).

  • 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. As you stated I had already run /flushdns and it started working. That's what I get for assuming things. Thanks for your help. You were on the right track.


    ,

    Mike Thien

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply