English 中文(简体)
SQLBulkCopy connection errors when working with SQL Azure
原标题:

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

问题回答

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





相关问题
add column while copying data in sql

I m using SqlBulkCopy to bulk insert some records from one table into another table. The query is using a SqlDataReader to get the data. The one difference that matters (besides column order which ...

System.InvalidOperationException with SQlBulkCopy

I got the following error when executing bulkcopy. System.InvalidOperationException The given value of type String from the data source cannot be converted to type decimal of the specified target ...

SqlBulkCopy with SqlHelper class

I ve installed DataAccessApplicationBlock.msi and I got the Microsoft.ApplicationBlocks.Data.dll file into my bin folder. I found every other sqlhelper methods except ExecuteBulkCopy. How do I add ...

SqlBulkCopy failing with String conversion issue

I have a view which generates a number of columns which I want to bulk load into another table which has identically named columns. This procedure worked fine when I was looping over the ...

SqlBulkCopy problem

i use SqlBulkCopy to insert data from OleDbDataReader (contains data from xls) to mssql-2005 i have a cloumn on the OleDbDataReader that contains number stored as text (in the xls) when i look ...

SQLBulkCopy connection errors when working with SQL Azure

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 ...

热门标签