title: Initial connection to SQL Server Connection Is Slow. Why?
body: <p>I have run into a situation with a C# application installed at two sites where the initial connection to SQL Server is extremely slow.  I wrote a test application to verify where the slowdown occurs and it is on the first SQLConnection.Open statement.  It was taking about 41 seconds to establish a connection to the server via named pipes.  We thought it might be a DNS issue but its just as slow using a TCP/IP connection.  After the initial connection is made the connection is pooled and the application responds normally.  Both the workstation and the server are decent machines running Windows 7 Pro, Core 2 Duo 3.16 Ghz with 4 gig of Ram.  I did find the following article on a microsoft forum: </p>
  
  <p><a href="http://social.msdn.microsoft.com/Forums/en/windowscompatibility/thread/f295994c-5812-4e46-8ac9-f05471d4dd54">http://social.msdn.microsoft.com/Forums/en/windowscompatibility/thread/f295994c-5812-4e46-8ac9-f05471d4dd54</a></p>
  
  <p>Turning off the LLMNR protocol did cut the initial connection time in about half to 21 seconds.  However, this is still a long time to get an initial connection to SQL Server.  The only things slightly different from our norm is that DNS in this case is done thru a router and not an actual server.  This has occurred at only two places so far, others run with no issues.  Any help would be appreciated.</p>
  
  <p>Thank You,
  Dennis</p>