When dealing with SQL Azure, SQLBulkCopy connection issues occur.

azure-sql-database sqlbulkcopy

Question

We are currently trying out the SQLBulkCopy API on the new SQL Azure CTP.

While we have been able to consistently migrate tables with about a million rows, we are facing connection errors when working with larger tables. We keep getting (after random row transfers) the following error:

A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

I understand that SQL Azure connection policies (mentioned here) state that the connection can be terminated for a number of reasons and it also mentions some error codes that are returned.But I am not able to understand which of these might be causing the error or capture the error code.

Is there a way we can get past this error and continue with the migration of table rows?

The SQLBulkCopy options used are:
BatchSize=1000
BulkCopyTimeout = 5000

1
4
4/9/2010 5:36:59 AM

Popular Answer

Knowledge Base article 977291 gives this error message as a symptom of a Windows 2003 TCP/IP issue.

2
10/27/2010 9:25:20 AM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow