Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We've been getting the following error a couple of times a day:

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: TCP Provider, error: 0 - The requested name is valid, but no data of the requested type was found.).

In doing some research, it seems like this is an error resolving the host name to an IP address. What confuses me is that the issue doesn't happen every time. Has anyone seen this issue before? Thanks in advance.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

When I had a similar intermittent problems I found that I had a DNS Search Suffix list with some expired domains in it that caused the DNS lookup to run for over 30 seconds. Since the the server caches the DNS names for approx 20 minutes I could not reproduce the issue with ping since the cached DNS entry is used.

Check your search suffix list with "IPCONFIG /ALL", try to reproduce the problem with a cleared DNS cache "IPCONFIG /FLUSHDNS"

share|improve this answer
    
Also, my problem was that the client was using the short server host name in the connection string, one should always use a FQDN. –  Michael Eklöf Apr 20 '11 at 6:55
    
You could be onto something on both counts. On some of our web servers, we found extra entries in the DNS host lists. We're also not using FQDNs, which is a good idea. The first will get fixed and the second might be some politics... I'll let you know how everything goes. –  Ben Thul Apr 21 '11 at 2:31
    
That cleared it up! Thanks for the help... I marked yours as the answer. –  Ben Thul Apr 22 '11 at 18:59
    
Glad to be of help, thanks for the accept! –  Michael Eklöf Apr 22 '11 at 19:39
add comment

I've seen this issue frequently on connections that were less than optimal, such as a wireless connection. 99% of the time, it is definitely related to name resolution. When you ping, is it able to resolve the name to an IP, and if so, what is the ping time?

Are you getting this error when connecting to the instance remotely through Management Studio?

share|improve this answer
    
When I ping from one of the servers in the web tier, it resolves and is coming back with a <1ms time. –  Ben Thul Apr 19 '11 at 18:19
add comment

Your Answer

 
discard

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.