title: Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Communication link failure
body: <p>Below, you'll notice some Windows Command Prompt commands that I'm trying to call from the 64 bit Program Files folder for Microsoft SQL Server 2008</p>
  
  <pre><code>C:\Program Files\Microsoft SQL Server\100\Tools\Binn&gt;SQLCMD -S "SQLI2B2" -d
   "I2B2_CRC-DEV" -i "C:\SVN\ONT\SQL SERVER\DX_SQLSERVER.sql" -E
  </code></pre>
  
  <blockquote>
    <p>HResult 0x2746, Level 16, State 1 TCP Provider: An existing connection
    was forcibly closed by the remote host.</p>
    
    <p>Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Communication
    link failure.</p>
  </blockquote>
  
  <p>c:\Program Files\Microsoft SQL Server\100\Tools\Binn></p>
  
  <p>Now, the database (server) I'm connecting to is SQL Server 2008.  I had several directories under the "Microsoft SQL Server" folder.  90, 100, 110, and 120.  Only 100 and 110 had the <code>.\Tools\Binn\SQLCMD.EXE</code> file.  I noticed the following drivers in <code>\\Control Panel\All Control Panel Items\Administrative Tools\Data Sources (ODBC)\Drivers\</code>, so I don't know if the client driver is correct for my server version.</p>
  
  <pre><code>Name                            Version
  SQL Server                      6.01.7601.17514
  SQL Server Native Client 10.0   2009.100.1600.01
  SQL Server Native Client 11.0   2011.110.3000.00
  </code></pre>
  
  <p>The <code>-E</code> in the command implies to use Windows Authentication, instead of SQL Server Authentication (with an actual user and password).</p>
  
  <p>What could be causing this error, and what can fix it?</p>
  
  <p>Notes:</p>
  
  <p>This was found on Windows 7.  The following resolution only applies to earlier Operating Systems.</p>
  
  <p><a href="https://msdn.microsoft.com/en-us/library/ms187005.aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/ms187005.aspx</a></p>