Connection Issue of SQL server when running bcp command from windows bat file.
Winnie zhang
106
Reputation points
We have a bat file which contains several bcp and SQLCMD commands to bulk insert the data for the tables and execute some SQL files.
However, the connection is not stable for some environments. And the error happened randomly. And it may resolved when re-execute the commands.
The error is :
“Connection established is forcefully closed by remote host”.
I saw the link https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/connect/tls-exist-connection-closed
However, this could not resolve the error. Please kindly suggest.
SQL Server Other
14,494 questions
Sign in to answer