That isn't a timeout, it's an SSL / encrytion issue.
See Applications experience forcibly closed TLS connection errors when connecting SQL Servers in Windows
Error - existing connection was forcibly closed by the remote host
Hi. I am using a console .NET application which uses the SQL BCP queryout method to retrieve data from table and store in a delimited file. If the select query is taing a longer time, then i have observed this timeout. Are there any parameters which need to be added in BCP syntax to avoid this issue ?
Some times I am getting the below error : SQLState = 08001, NativeError = 10054
Error = [Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: An existing connection was forcibly closed by the remote host.
SQLState = 08001, NativeError = 10054
Error = [Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection
How to fix this ?
SQL Server | Other
2 answers
Sort by: Most helpful
-
Olaf Helper 47,516 Reputation points
2021-09-21T06:19:55.883+00:00 -
CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
2021-09-21T07:03:26.463+00:00 What are the windows versions on both servers? Suggest you reading the MS document that Olaf mentioned. Please check if your environment is one situation of that.
By the way, please check if this blog could help you. Suggest you to try the suggestions in test environment.
> If it is an encryption issue, won't all the queries fail ?
No, you may get an error at random times.
If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar thread.