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
C:\Program Files\Microsoft SQL Server\100\Tools\Binn>SQLCMD -S "SQLI2B2" -d
"I2B2_CRC-DEV" -i "C:\SVN\ONT\SQL SERVER\DX_SQLSERVER.sql" -E
HResult 0x2746, Level 16, State 1 TCP Provider: An existing connection was forcibly closed by the remote host.
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Communication link failure.
c:\Program Files\Microsoft SQL Server\100\Tools\Binn>
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 .\Tools\Binn\SQLCMD.EXE
file. I noticed the following drivers in \\Control Panel\All Control Panel Items\Administrative Tools\Data Sources (ODBC)\Drivers\
, so I don't know if the client driver is correct for my server version.
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
The -E
in the command implies to use Windows Authentication, instead of SQL Server Authentication (with an actual user and password).
What could be causing this error, and what can fix it?
Notes:
This was found on Windows 7. The following resolution only applies to earlier Operating Systems.