I have read numerous posts and articles about the error:
Shared Memory Provider: No process is on the other end of the pipe. Communication link failure.
...including these:
I can connect easily and always from SSMS, both from Mixed Mode and Windows Authentication. But whenever I try to run a sql script via sqlcmd.exe
, I get the error shown above.
Here is what I am running from windows command shell:
"C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\sqlcmd.exe" -S localhost -U sa -P myPassword -i "F:\<mypath>\<myfile>.sql"
Here is what I have tried/verified:
- I am running
SQL Server version 14.0
on Windows 10. - Mixed mode authentication is enabled, and I can connect from SSMS.
- I have tried specifying
127.0.0.1
instead oflocalhost
in my cmd-line. - Shared Memory protocol is enabled.
- Named Pipes protocol is enabled.
- TCP/IP is enabled.
- My SQL Server service is running - I can connect from SSMS.
- I have opened port 1433 inbound and outbound in my windows firewall, and SQL Server (as an application) is allowed by my firewall. (Even when I turn my firewall OFF I still get this same error.)
- Remote connections are enabled.
- SQL Server Browser service is enabled and running.
- SQL Server Agent is enabled and running (though I do not think this is necessary).
- I have restarted the SQL Server service and rebooted several times.
MOST IMPORTANT: This must have something to do with my input file, which is over 200 Mb. When I run the same cmd-line statement as above, but instead point to test.sql
, which contains nothing more than select getdate()
, it works perfectly. No errors, no connection problems.
After everything I have tried, I forever get that same error. What else can I try?