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:
BulkCopyTimeout = 5000