Can't Connect to SQL 2008 R2 with server name

  • Hello all,

    I am trying to connect to a sql server 2008 R2 from my local machine SQL 2008 mangement studio. I could not connect with server name but I can connect with IP address.

    I pinged the server with server name and didn't get any response. But when pinged with IP I get the response..

    One of my colleagues is able to connect to the server with server name using same sql server account.

    What could be the problem ?

  • Sounds more likely to be a DNS issue than a SQL issue?

  • Is there a way I can fix that DNS issue ?

  • In the command prompt, type:

    nbtstat -A (IP ADDRESS OF MACHINE)

    See what it resolves as the host name

    Could be one of many things really...

  • Did that...It shows the server name I have to connect....interesting

  • Can you browse to the server (name) in management studio with the connect to database engine dialogue?

    What is the actual error you get when you try to connect?

  • This is the error I get when I connect to server with servername..

    TITLE: Connect to Server

    ------------------------------

    Cannot connect to XXXXX

    ------------------------------

    ADDITIONAL INFORMATION:

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

  • "Cannot connect to XXXXX."

    Apologies if I'm off track, but is the actual name of the server?

    It sounds like it is the name of a database, rather than the machine it is running from?

    If you're using Management Studio, you would connect to the host machine name.

    If it isn't that, maybe check if you gave the instance a name which isn't the default (i.e. MSSQLSERVER) - in which case, you would have to use the "HOST MACHINE\INSTANCE NAME" format to connect to the host.

    If it is neither of the above, then you could try disabling the firewall for a period and try connecting again to either confirm that as the cause or rule it out....

  • oops I am sorry but could you please edit your previous post to change the servername to XXXX...

    Thats the servername and am connecting to default instance...As I have mentioned in my previous post I was able to log in from my colleague's machine with same sql server account

  • No probs, better to avoid posting server names on an open forum anyway I guess 🙂

    Have you tried the firewall to rule it in or out?

  • Sorry for that....I was in a hurry and just cipoed the error message as it is....anyway firewall on my local machine is off...

  • It's the server firewall that would have to be turned on or off.

    I would think it unlikely if you can connect on an alternative PC though to be honest.

    Is the working PC on a different subnet or network?

    Also, were you able to browse to the server within Management Studio?

    (dropdown Server name, and choose "<browse for more>")

    On the network servers tab, you should see a list of all servers broadcasting within your network.

  • Nope..

  • we are on the same network and when I browse for all servers...It just shows small no.of network servers....but I can connect to other servers which are not listed in that list...

  • Did any of you ever figure this one out? I am having the same issue with one of my contractors.

    Everyone else can connect to the 2008R2 server via name, or IP while the contractor can only connect via ip. He needs to use a modeling tool that doesn't like the IP address for some reason, or I would just forget about it, and have him use the IP.

    Thanks,

Viewing 15 posts - 1 through 15 (of 19 total)

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